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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2020-08-20 11:34:34 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2020-08-20 11:34:34 +0300
commitc5009f6cbef05e65576614897d56f888fb9ca956 (patch)
treed92baf3327348e3ab73e4e18fef1b965f5d7ada3
parent4fe8c180696d13ee582b7ba69d4606ddf8cd269b (diff)
13.6.4 releasev13.6.4
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js3256
-rw-r--r--src/main/webapp/js/diagramly/App.js2
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js164
-rw-r--r--src/main/webapp/js/diagramly/GraphViewer.js18
-rw-r--r--src/main/webapp/js/diagramly/Menus.js2
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js6
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js9
-rw-r--r--src/main/webapp/js/viewer-static.min.js2400
-rw-r--r--src/main/webapp/js/viewer.min.js2400
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/shortcuts.svg2
13 files changed, 4213 insertions, 4056 deletions
diff --git a/ChangeLog b/ChangeLog
index 76738c39..ec9692fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20-AUG-2020: 13.6.4
+
+- Adds Shift/Ctrl+Cursor to move/select pages
+- Fixes orientation of screen page formats
+- Adds allowZoomOut switch in GraphViewer
+
18-AUG-2020: 13.6.3
- Handles extra HTML content on Sharepoint
diff --git a/VERSION b/VERSION
index 06a34828..d59f23d1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-13.6.3 \ No newline at end of file
+13.6.4 \ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 8399c525..9371bb4a 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -2229,7 +2229,7 @@ e.height,e.width));c&&r||e.width==y.width&&e.height==y.height||(y=e,null!=b&&b(y
x(a,!0)});x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return y},widthInput:m,heightInput:p}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
-{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
+{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
var FilenameDialog=function(a,c,d,b,f,e,h,g,k,l,n,m){k=null!=k?k:!0;var p,q,t=document.createElement("table"),v=document.createElement("tbody");t.style.marginTop="8px";p=document.createElement("tr");q=document.createElement("td");q.style.whiteSpace="nowrap";q.style.fontSize="10pt";q.style.width=n?"80px":"120px";mxUtils.write(q,(f||mxResources.get("filename"))+":");p.appendChild(q);var u=document.createElement("input");u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width=null!=m?m+
"px":"180px";var w=mxUtils.button(d,function(){if(null==e||e(u.value))k&&a.hideDialog(),b(u.value)});w.className="geBtn gePrimaryBtn";this.init=function(){if(null!=f||null==h)if(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=u,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),w.click());a.stopPropagation();a.preventDefault()}))}}};q=document.createElement("td");
@@ -2288,14 +2288,14 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
arguments);d.updateActionStates()};a.editLink=d.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,c=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){"mouseDown"==b.getProperty("eventName")&&c.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){c.hideShapePicker(!0)}));var d=
-a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=c.shapePicker};var b=a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))b.apply(this,arguments);else{mxEvent.consume(a);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));c.showShapePicker(e.x,e.y)}};if(null!=this.hoverIcons){var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();
-f.apply(this,arguments)};var e=this.hoverIcons.execute;this.hoverIcons.execute=function(b,d,f){var g=f.getEvent();mxEvent.isControlDown(g)||mxEvent.isShiftDown(g)?e.apply(this,arguments):this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(e,g,h){e=a.getCompositeParent(b.cell);g=a.getCellGeometry(e);for(f.consume();null!=e&&a.model.isVertex(e)&&null!=g&&g.relative;)cell=e,e=a.model.getParent(cell),g=a.getCellGeometry(e);c.showShapePicker(f.getGraphX(),
-f.getGraphY(),e,mxUtils.bind(this,function(a){h(a)}),d)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
+a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=c.shapePicker};var b=a.dblClick;a.dblClick=function(a,d){if(this.isEnabled())if(null!=d||null==c.sidebar||mxEvent.isShiftDown(a))b.apply(this,arguments);else{mxEvent.consume(a);var e=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(e.x,e.y)}),30)}};if(null!=this.hoverIcons){var f=this.hoverIcons.drag;
+this.hoverIcons.drag=function(){c.hideShapePicker();f.apply(this,arguments)};var e=this.hoverIcons.execute;this.hoverIcons.execute=function(b,d,f){var g=f.getEvent();mxEvent.isControlDown(g)||mxEvent.isShiftDown(g)?e.apply(this,arguments):this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(e,g,h){e=a.getCompositeParent(b.cell);g=a.getCellGeometry(e);for(f.consume();null!=e&&a.model.isVertex(e)&&null!=g&&g.relative;)cell=e,e=a.model.getParent(cell),
+g=a.getCellGeometry(e);c.showShapePicker(f.getGraphX(),f.getGraphY(),e,mxUtils.bind(this,function(a){h(a)}),d)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,d,b,f){var e=this.getCellsForShapePicker(d);if(null!=e&&0<e.length){var h=this,g=this.editor.graph,k=document.createElement("div"),l=g.view.getState(d),n=null==d||null!=l&&g.isTransparentState(l)?null:g.copyStyle(d);k.className="geToolbarContainer geSidebarContainer geSidebar";k.style.cssText="position:absolute;left:"+a+"px;top:"+c+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";
-f==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-100%)"):f==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)"):f==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(k.style,"transform","translate(-100%,-50%)"):f==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(k.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(k.style,"transform","translate(-4px,-4px)");null!=g.background&&g.background!=mxConstants.NONE&&
-(k.style.backgroundColor=g.background);g.container.appendChild(k);d=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";k.appendChild(e);null!=n?this.sidebar.graph.pasteStyle(n,[d]):h.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);
-mxEvent.addListener(e,"click",function(){var e=g.cloneCell(d);if(null!=b)b(e);else{e.geometry.x=g.snap(Math.round(a/g.view.scale)-g.view.translate.x-d.geometry.width/2);e.geometry.y=g.snap(Math.round(c/g.view.scale)-g.view.translate.y-d.geometry.height/2);g.model.beginUpdate();try{g.addCell(e)}finally{g.model.endUpdate()}g.setSelectionCell(e);g.scrollCellToVisible(e);g.startEditingAtCell(e);null!=h.hoverIcons&&h.hoverIcons.update(g.view.getState(e))}h.hideShapePicker()})});for(f=0;f<e.length;f++)d(e[f]);
-null!=h.hoverIcons&&h.hoverIcons.reset();g.popupMenuHandler.hideMenu();g.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=b;this.shapePicker=k}};
+f==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-100%)"):f==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0%)"):f==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(k.style,"transform","translate(-100%,-50%)"):f==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(k.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(k.style,"transform","translate(-22px,-22px)");null!=g.background&&g.background!=
+mxConstants.NONE&&(k.style.backgroundColor=g.background);g.container.appendChild(k);d=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";k.appendChild(e);null!=n?this.sidebar.graph.pasteStyle(n,[d]):h.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,
+d.geometry.height);mxEvent.addListener(e,"click",function(){var e=g.cloneCell(d);if(null!=b)b(e);else{e.geometry.x=g.snap(Math.round(a/g.view.scale)-g.view.translate.x-d.geometry.width/2);e.geometry.y=g.snap(Math.round(c/g.view.scale)-g.view.translate.y-d.geometry.height/2);g.model.beginUpdate();try{g.addCell(e)}finally{g.model.endUpdate()}g.setSelectionCell(e);g.scrollCellToVisible(e);g.startEditingAtCell(e);null!=h.hoverIcons&&h.hoverIcons.update(g.view.getState(e))}h.hideShapePicker()})});for(f=
+0;f<e.length;f++)d(e[f]);null!=h.hoverIcons&&h.hoverIcons.reset();g.popupMenuHandler.hideMenu();g.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=b;this.shapePicker=k}};
EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,b,c,e){return this.editor.graph.createVertex(null,null,e||"",0,0,b||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
80,100),c("triangle;whiteSpace=wrap;html=1;",60,80),c("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),c("shape=tape;whiteSpace=wrap;html=1;",120,100),c("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),c("shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80)]};
@@ -9017,410 +9017,410 @@ this.getTagsForStencil("mxgraph.weblogos","xanga","web logos logo").join(" ")),t
74.4,43.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yahoo_2;fillColor=#65106E;strokeColor=none",80,46.6,"","Yahoo",null,null,this.getTagsForStencil("mxgraph.weblogos","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(" "))])}})();
-DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=e||"";this.shadowPages=null;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=function(a,d){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=d||"";this.shadowPages=null;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.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.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.synchronizeFile=function(a,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,e):this.updateFile(a,e)};
-DrawioFile.prototype.updateFile=function(a,e,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,a,e,b):this.reloadFile(a,e))}catch(f){null!=e&&e(f)}}),e))};
-DrawioFile.prototype.mergeFile=function(a,e,c,b){var k=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),l=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=l&&0<l.length){this.shadowPages=l;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var d=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(d)){var g=this.ui.patchPages(f,
-d[0]);b={};var m=this.ui.getHashValueForPages(g,b),f={},n=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",n==m,m);if(null!=m&&m!=n){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),t=this.compressReportData(this.getAnonymizedXmlForPages(g)),u=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,d,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+m+"\nCurrent: "+n+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=c&&c(y);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),x=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(A){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var e=new mxCodec(mxUtils.createXmlDocument()),c=e.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var k=e.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,k,!0);c.appendChild(k)}return mxUtils.getPrettyXml(c)};
-DrawioFile.prototype.compressReportData=function(a,e,c){e=null!=e?e:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>e&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,e,c,b,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=e)for(a=0;a<e.length;a++)this.ui.anonymizePatch(e[a]);var f=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(e,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=c?c:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?f(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?f(a):f(null)}),function(){})}else{var l=this.getCurrentUser(),d=null!=l?l.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(a,e,c,b){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),l=this.getCurrentUser(),d=null!=l?this.ui.hashValue(l.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",m=this.getTitle(),n=m.lastIndexOf("."),l="xml";0<n&&(l=m.substring(n));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+l+")\nUser="+d+g+"\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!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+f,b)}catch(t){}};
-DrawioFile.prototype.reloadFile=function(a,e){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),e=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(e,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
-a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=e&&e(b)}};DrawioFile.prototype.copyFile=function(a,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
-DrawioFile.prototype.ignorePatches=function(a){for(var e=!0,c=0;c<a.length&&e;c++)e=e&&0==Object.keys(a[c]).length;return e};
-DrawioFile.prototype.patch=function(a,e){var c=this.ui.editor.undoManager,b=c.history.slice(),k=c.indexOfNextAdd,f=this.ui.editor.graph;f.container.style.visibility="hidden";var l=this.changeListenerEnabled;this.changeListenerEnabled=!1;var d=f.foldingEnabled,g=f.mathEnabled,m=f.cellRenderer.redraw;f.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());m.apply(this,arguments)};f.model.beginUpdate();try{for(var n=
-0;n<a.length;n++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[n],!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=m;this.changeListenerEnabled=l;c.history=b;c.indexOfNextAdd=k;c.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=
-f.mathEnabled?(this.ui.editor.updateGraphComponents(),f.refresh()):(d!=f.foldingEnabled?f.view.revalidate():f.view.validate(),f.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,e,c,b,k,f){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=c)c({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=c)c({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(l){if(null!=c)c(l);else throw l;}};
-DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,e,c){};DrawioFile.prototype.saveFile=function(a,e,c,b){};
+DrawioFile.prototype.synchronizeFile=function(a,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,d):this.updateFile(a,d)};
+DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=g?this.mergeFile(g,a,d,b):this.reloadFile(a,d))}catch(f){null!=d&&d(f)}}),d))};
+DrawioFile.prototype.mergeFile=function(a,d,c,b){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),l=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=l&&0<l.length){this.shadowPages=l;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var n=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(n)){var e=this.ui.patchPages(f,
+n[0]);b={};var k=this.ui.getHashValueForPages(e,b),f={},m=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",n,"checksum",m==k,k);if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(l)),q=this.compressReportData(this.getAnonymizedXmlForPages(e)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,n,"Shadow Details: "+JSON.stringify(b)+
+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(n,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=c&&c(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,x)}}catch(A){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);c.appendChild(g)}return mxUtils.getPrettyXml(c)};
+DrawioFile.prototype.compressReportData=function(a,d,c){d=null!=d?d:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a};
+DrawioFile.prototype.checksumError=function(a,d,c,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var e=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=c?c:"")+"\n\nPatches:\n"+e+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==b?f(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==b?f(a):f(null)}),function(){})}else{var l=this.getCurrentUser(),n=null!=l?l.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+n+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(e){}}}catch(e){}};
+DrawioFile.prototype.sendErrorReport=function(a,d,c,b){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),f=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),l=this.getCurrentUser(),n=null!=l?this.ui.hashValue(l.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",k=this.getTitle(),m=k.lastIndexOf("."),l="xml";0<m&&(l=k.substring(m));var p=null!=c?c.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+l+")\nUser="+n+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!=d?"\n\n"+d:
+"")+(null!=c?"\n\nError: "+c.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+f,b)}catch(q){}};
+DrawioFile.prototype.reloadFile=function(a,d){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),d=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(d,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var f=this.ui.getCurrentFile();null!=f&&(f.stats=this.stats);null!=a&&
+a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}catch(b){null!=d&&d(b)}};DrawioFile.prototype.copyFile=function(a,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
+DrawioFile.prototype.ignorePatches=function(a){for(var d=!0,c=0;c<a.length&&d;c++)d=d&&0==Object.keys(a[c]).length;return d};
+DrawioFile.prototype.patch=function(a,d){var c=this.ui.editor.undoManager,b=c.history.slice(),g=c.indexOfNextAdd,f=this.ui.editor.graph;f.container.style.visibility="hidden";var l=this.changeListenerEnabled;this.changeListenerEnabled=!1;var n=f.foldingEnabled,e=f.mathEnabled,k=f.cellRenderer.redraw;f.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());k.apply(this,arguments)};f.model.beginUpdate();try{for(var m=
+0;m<a.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[m],!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{f.container.style.visibility="";f.model.endUpdate();f.cellRenderer.redraw=k;this.changeListenerEnabled=l;c.history=b;c.indexOfNextAdd=g;c.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)e!=
+f.mathEnabled?(this.ui.editor.updateGraphComponents(),f.refresh()):(n!=f.foldingEnabled?f.view.revalidate():f.view.validate(),f.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,d,c,b,g,f){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=c)c({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=c)c({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(l){if(null!=c)c(l);else throw l;}};
+DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,d,c){};DrawioFile.prototype.saveFile=function(a,d,c,b){};
DrawioFile.prototype.getPublicUrl=function(a){a(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(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,c){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,e,c){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,c){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,d,c){};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(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();if(null!=a){var e=function(a){for(var b=0;null!=a&&b<a.length;b++){var c=a[b];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(a);this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)}this.installListeners();this.isSyncSupported()&&this.startSync()};
-DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(a,e){a(null)};DrawioFile.prototype.loadDescriptor=function(a,e){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,e){this.loadDescriptor(mxUtils.bind(this,function(c){a(c)}),e)};DrawioFile.prototype.patchDescriptor=function(a,e){this.setDescriptorEtag(a,this.getDescriptorEtag(e))};
+DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();if(null!=a){var d=function(a){for(var b=0;null!=a&&b<a.length;b++){var c=a[b];null!=c.id&&0==c.id.indexOf("extFont_")&&c.parentNode.removeChild(c)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(a);this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(a,d){a(null)};DrawioFile.prototype.loadDescriptor=function(a,d){a(null)};DrawioFile.prototype.loadPatchDescriptor=function(a,d){this.loadDescriptor(mxUtils.bind(this,function(c){a(c)}),d)};DrawioFile.prototype.patchDescriptor=function(a,d){this.setDescriptorEtag(a,this.getDescriptorEtag(d))};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(a){return null};DrawioFile.prototype.getCurrentUser=function(){return null};
-DrawioFile.prototype.getLatestVersion=function(a,e){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
-DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(a,e){this.setDescriptorEtag(a,e)};DrawioFile.prototype.getDescriptorRevisionId=function(a){return this.getDescriptorEtag(a)};DrawioFile.prototype.setDescriptorEtag=function(a,e){};DrawioFile.prototype.getDescriptorEtag=function(a){return null};DrawioFile.prototype.getDescriptorSecret=function(a){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,e){var c=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=c&&c.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.getLatestVersion=function(a,d){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
+DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(a,d){this.setDescriptorEtag(a,d)};DrawioFile.prototype.getDescriptorRevisionId=function(a){return this.getDescriptorEtag(a)};DrawioFile.prototype.setDescriptorEtag=function(a,d){};DrawioFile.prototype.getDescriptorEtag=function(a){return null};DrawioFile.prototype.getDescriptorSecret=function(a){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,d){var c=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=c&&c.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(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+a+'">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&this.isRevisionHistorySupported()&&(a[0].style.cursor="pointer",a[0].style.textDecoration="underline",mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(e){console.error(e),this.removeDraft()}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(d){console.error(d),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
-DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" class="geStatusAlert" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{e=this.getErrorMessage(a);if(null==e&&null!=this.lastSaved){var c=this.ui.timeSince(new Date(this.lastSaved));
-null!=c&&(e=mxResources.get("lastSaved",[c]))}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" style="cursor:pointer;overflow:hidden;">'+e+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');e=this.ui.statusContainer.getElementsByTagName("div");
-null!=e&&0<e.length?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" style="overflow:hidden;">'+e+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),
+DrawioFile.prototype.addUnsavedStatus=function(a){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(a instanceof Error&&null!=a.message&&""!=a.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert" style="overflow:hidden;">'+d+" ("+mxUtils.htmlEntities(a.message)+")</div>")}else{d=this.getErrorMessage(a);if(null==d&&null!=this.lastSaved){var c=this.ui.timeSince(new Date(this.lastSaved));
+null!=c&&(d=mxResources.get("lastSaved",[c]))}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" style="cursor:pointer;overflow:hidden;">'+d+' <img src="'+Editor.saveImage+'" align="top" style="width:16px;margin-top:'+(mxClient.IS_FF?-3:-2)+'px"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");
+null!=d&&0<d.length?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" style="overflow:hidden;">'+d+" ("+mxUtils.htmlEntities(a.message)+")</div>"));EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(null!=this.saveDraftThread&&window.clearTimeout(this.saveDraftThread),
this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.saveDraft()}),0))}};
-DrawioFile.prototype.addConflictStatus=function(a,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();var c=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
+DrawioFile.prototype.addConflictStatus=function(a,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();var c=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=c&&0<c.length?mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(b){"IMG"!=mxEvent.getSource(b).nodeName&&
a()})):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),a)};DrawioFile.prototype.setConflictStatus=function(a){this.ui.editor.setStatus('<div title="'+a+'" class="geStatusAlert geBlink" style="cursor:pointer;overflow:hidden;">'+a+' <a href="https://desk.draw.io/support/solutions/articles/16000087947" target="_blank"><img border="0" style="margin-left:2px;cursor:help;opacity:0.5;width:16px;height:16px;" valign="bottom" src="'+Editor.helpImage+'" style=""/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(a,e,c){null==c&&(c=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,e)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,e)}),c),this.ui.showError(mxResources.get("error")+" ("+c+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
-e)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
-DrawioFile.prototype.showCopyDialog=function(a,e,c){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,e)}),null,mxResources.get("overwrite"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
-DrawioFile.prototype.showConflictDialog=function(a,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxResources.get("redirectToNewApp");null!=e&&(b+=" ("+e+")");var k=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():
-window.location.href=c});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(b,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(a,e){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,e);else if(this.isModified()&&this.addUnsavedStatus(a),e)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var c=this.getErrorMessage(a);null!=c&&60<c.length&&(c=c.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
+DrawioFile.prototype.showRefreshDialog=function(a,d,c){null==c&&(c=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(a,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(a,d)}),c),this.ui.showError(mxResources.get("error")+" ("+c+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,
+d)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
+DrawioFile.prototype.showCopyDialog=function(a,d,c){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,d)}),null,mxResources.get("overwrite"),c,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
+DrawioFile.prototype.showConflictDialog=function(a,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
+DrawioFile.prototype.redirectToNewApp=function(a,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var c=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),b=mxResources.get("redirectToNewApp");null!=d&&(b+=" ("+d+")");var g=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==c?window.location.reload():
+window.location.href=c});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(b,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(b,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.handleFileError=function(a,d){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,d);else if(this.isModified()&&this.addUnsavedStatus(a),d)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var c=this.getErrorMessage(a);null!=c&&60<c.length&&(c=c.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=c?" ("+mxUtils.htmlEntities(c)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,e){var c=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),b=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,c,b,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),f=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,c,b,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),b)});"none"==DrawioFile.SYNC?this.showCopyDialog(c,b,k):this.invalidChecksum?this.showRefreshDialog(c,b,this.getErrorMessage(a)):e?this.showConflictDialog(k,f):this.addConflictStatus(mxUtils.bind(this,
-function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(c,b)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var e=null!=a?null!=a.error?a.error.message:a.message:null;null==e&&null!=a&&a.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.handleConflictError=function(a,d){var c=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),b=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,c,b,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),f=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,c,b,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),b)});"none"==DrawioFile.SYNC?this.showCopyDialog(c,b,g):this.invalidChecksum?this.showRefreshDialog(c,b,this.getErrorMessage(a)):d?this.showConflictDialog(g,f):this.addConflictStatus(mxUtils.bind(this,
+function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(c,b)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var d=null!=a?null!=a.error?a.error.message:a.message:null;null==d&&null!=a&&a.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(){this.lastChanged=new Date;this.setModified(!0);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(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&
-(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var e=Editor.guid(32);null!=this.sync?this.sync.createToken(e,mxUtils.bind(this,function(c){a(e,c)}),mxUtils.bind(this,function(){a(e)})):a(e)};
-DrawioFile.prototype.fileSaved=function(a,e,c,b,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=c&&c()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),e,c,b,k)}catch(d){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var f=
-this.getCurrentUser(),l=null!=f?f.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),l,d)}}catch(g){}}};
-DrawioFile.prototype.autosave=function(a,e,c,b){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<e?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=c&&c(a)}),mxUtils.bind(this,
-function(a){null!=b&&b(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=c&&c(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var d=Editor.guid(32);null!=this.sync?this.sync.createToken(d,mxUtils.bind(this,function(c){a(d,c)}),mxUtils.bind(this,function(){a(d)})):a(d)};
+DrawioFile.prototype.fileSaved=function(a,d,c,b,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=c&&c()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),d,c,b,g)}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=b&&b(n);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,n);else{var f=
+this.getCurrentUser(),l=null!=f?f.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),l,n)}}catch(e){}}};
+DrawioFile.prototype.autosave=function(a,d,c,b){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<d?a:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=c&&c(a)}),mxUtils.bind(this,
+function(a){null!=b&&b(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=c&&c(null)}),a);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var c=a.lastIndexOf("."),b=0<c?a.substring(c):"",c=e.lastIndexOf(".");return b===(0<c?e.substring(c):"")}return a==e};
+DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,d){if(null!=a&&null!=d){var c=a.lastIndexOf("."),b=0<c?a.substring(c):"",c=d.lastIndexOf(".");return b===(0<c?d.substring(c):"")}return a==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(a,e){a([])};DrawioFile.prototype.addComment=function(a,e,c){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,e){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,e)};LocalFile=function(a,e,c,b,k,f){DrawioFile.call(this,a,e);this.title=c;this.mode=b?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=f};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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 null==this.fileHandle};LocalFile.prototype.save=function(a,e,c){this.saveAs(this.title,e,c)};LocalFile.prototype.saveAs=function(a,e,c){this.saveFile(a,!1,e,c)};LocalFile.prototype.saveAs=function(a,e,c){this.saveFile(a,!1,e,c)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
-LocalFile.prototype.getLatestVersion=function(a,e){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,e)};
-LocalFile.prototype.saveFile=function(a,e,c,b,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var f=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);e=this.getData();var l=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=c&&c()}),d=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var c=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=b&&b({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){this.desc.lastModified==b.lastModified?a.write(f?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;l()}),c)}),c)}),c):(this.inConflictState=!0,c())}),c)}),c)}}else{if(this.ui.isOfflineApp()||
-this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,a,f?"image/png":"text/xml",f);else if(d.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(a)+(f?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));l()}});f?(k=this.ui.getPngFileProperties(this.ui.fileNode),
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){d(a)}),b,this.ui.getCurrentFile()!=this?e:null,k.scale,k.border)):d(e)};LocalFile.prototype.rename=function(a,e,c){this.title=a;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(a,e,c){LocalFile.call(this,a,e,c)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,c){this.saveFile(a,!1,e,c)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,c){DrawioFile.call(this,a,e);this.title=c};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(a,e,c){this.saveAs(this.getTitle(),e,c)};StorageFile.prototype.saveAs=function(a,e,c){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,c)};StorageFile.getFileContent=function(a,e,c,b){a.getDatabaseItem(e,function(a){c(null!=a?a.data:null)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(e,c):null!=b&&b()}),"files")};
-StorageFile.getFileInfo=function(a,e,c,b){a.getDatabaseItem(e,function(a){c(a)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(e,function(a){c(null!=a?{title:e}:null)}):null!=b&&b()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(a,e,c,b){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{var e=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}),k=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:k.length,lastModified:Date.now(),type:this.type},{title:this.title,data:k}],e,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,k,e):null!=b&&b()}),["filesInfo",
-"files"])}catch(d){null!=b&&b(d)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(c){this.isRenamable()&&this.getTitle()!=a&&null!=c?this.ui.confirm(mxResources.get("replaceIt",[a]),k,b):k()}),b)}else null!=c&&c()};
-StorageFile.prototype.rename=function(a,e,c){var b=this.getTitle();b!=a?StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(k){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,e)}),c)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[a]),f,c):f()}),c):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
-StorageFile.prototype.getLatestVersion=function(a,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(c){a(new StorageFile(this.ui,c,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(a){for(var e=[],c=0;c<localStorage.length;c++){var b=localStorage.key(c),k=localStorage.getItem(b);if(0<b.length&&"."!=b.charAt(0)&&0<k.length){var f=(null==a||"F"==a)&&("<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12)),l=(null==a||"L"==a)&&"<mxlibrary>"===k.substring(0,11);(f||l)&&e.push({title:b,type:f?"F":"L",size:k.length,lastModified:Date.now()})}}return e};
-StorageFile.migrate=function(a){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var c=a.transaction(["files","filesInfo"],"readwrite");a=c.objectStore("files");for(var c=c.objectStore("filesInfo"),b=0;b<e.length;b++){var k=e[b],f=localStorage.getItem(k.title);a.add({title:k.title,data:f});c.add(k)}};
-StorageFile.listFiles=function(a,e,c,b){a.getDatabaseItems(function(a){var b=[];if(null!=a)for(var k=0;k<a.length;k++)"."==a[k].title.charAt(0)||null!=e&&a[k].type!=e||b.push(a[k]);c(b)},function(){null==a.database?c(StorageFile.listLocalStorageFiles(e)):null!=b&&b()},"filesInfo")};StorageFile.deleteFile=function(a,e,c,b){a.removeDatabaseItem([e,e],c,function(){null==a.database?(localStorage.removeItem(e),c()):null!=b&&b()},["files","filesInfo"])};StorageLibrary=function(a,e,c){StorageFile.call(this,a,e,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,c){this.saveFile(a,!1,e,c)};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(a,e,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,e,c){DrawioFile.call(this,a,e);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,e,c){RemoteFile.call(this,a,e,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,e,c){};
-RemoteLibrary.prototype.saveAs=function(a,e,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,e,c){StorageFile.call(this,a,e,c);a=c;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,c){return!1};UrlLibrary.prototype.saveAs=function(a,e,c){};UrlLibrary.prototype.open=function(){};/*
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,d){a([])};DrawioFile.prototype.addComment=function(a,d,c){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,d){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,d)};LocalFile=function(a,d,c,b,g,f){DrawioFile.call(this,a,d);this.title=c;this.mode=b?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=f};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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 null==this.fileHandle};LocalFile.prototype.save=function(a,d,c){this.saveAs(this.title,d,c)};LocalFile.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalFile.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
+LocalFile.prototype.getLatestVersion=function(a,d){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,d)};
+LocalFile.prototype.saveFile=function(a,d,c,b,g){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;g||this.updateFileData();var f=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);d=this.getData();var l=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=c&&c()}),n=mxUtils.bind(this,function(e){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var c=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=b&&b({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){this.desc.lastModified==b.lastModified?a.write(f?this.ui.base64ToBlob(e,"image/png"):e).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;l()}),c)}),c)}),c):(this.inConflictState=!0,c())}),c)}),c)}}else{if(this.ui.isOfflineApp()||
+this.ui.isLocalFileSave())this.ui.doSaveLocalFile(e,a,f?"image/png":"text/xml",f);else if(e.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(e)+"&filename="+encodeURIComponent(a)+(f?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(e)}));l()}});f?(g=this.ui.getPngFileProperties(this.ui.fileNode),
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a)}),b,this.ui.getCurrentFile()!=this?d:null,g.scale,g.border)):n(d)};LocalFile.prototype.rename=function(a,d,c){this.title=a;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(a,d,c){LocalFile.call(this,a,d,c)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c};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(a,d,c){this.saveAs(this.getTitle(),d,c)};StorageFile.prototype.saveAs=function(a,d,c){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,d,c)};StorageFile.getFileContent=function(a,d,c,b){a.getDatabaseItem(d,function(a){c(null!=a?a.data:null)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(d,c):null!=b&&b()}),"files")};
+StorageFile.getFileInfo=function(a,d,c,b){a.getDatabaseItem(d,function(a){c(a)},mxUtils.bind(this,function(){null==a.database?a.getLocalData(d,function(a){c(null!=a?{title:d}:null)}):null!=b&&b()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{var d=mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=c&&c()}),g=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:g.length,lastModified:Date.now(),type:this.type},{title:this.title,data:g}],d,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,g,d):null!=b&&b()}),["filesInfo",
+"files"])}catch(n){null!=b&&b(n)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(c){this.isRenamable()&&this.getTitle()!=a&&null!=c?this.ui.confirm(mxResources.get("replaceIt",[a]),g,b):g()}),b)}else null!=c&&c()};
+StorageFile.prototype.rename=function(a,d,c){var b=this.getTitle();b!=a?StorageFile.getFileInfo(this.ui,a,mxUtils.bind(this,function(g){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,d)}),c)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[a]),f,c):f()}),c):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.getLatestVersion=function(a,d){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(c){a(new StorageFile(this.ui,c,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(a){for(var d=[],c=0;c<localStorage.length;c++){var b=localStorage.key(c),g=localStorage.getItem(b);if(0<b.length&&"."!=b.charAt(0)&&0<g.length){var f=(null==a||"F"==a)&&("<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12)),l=(null==a||"L"==a)&&"<mxlibrary>"===g.substring(0,11);(f||l)&&d.push({title:b,type:f?"F":"L",size:g.length,lastModified:Date.now()})}}return d};
+StorageFile.migrate=function(a){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var c=a.transaction(["files","filesInfo"],"readwrite");a=c.objectStore("files");for(var c=c.objectStore("filesInfo"),b=0;b<d.length;b++){var g=d[b],f=localStorage.getItem(g.title);a.add({title:g.title,data:f});c.add(g)}};
+StorageFile.listFiles=function(a,d,c,b){a.getDatabaseItems(function(a){var b=[];if(null!=a)for(var g=0;g<a.length;g++)"."==a[g].title.charAt(0)||null!=d&&a[g].type!=d||b.push(a[g]);c(b)},function(){null==a.database?c(StorageFile.listLocalStorageFiles(d)):null!=b&&b()},"filesInfo")};StorageFile.deleteFile=function(a,d,c,b){a.removeDatabaseItem([d,d],c,function(){null==a.database?(localStorage.removeItem(d),c()):null!=b&&b()},["files","filesInfo"])};StorageLibrary=function(a,d,c){StorageFile.call(this,a,d,c)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,c){this.saveFile(a,!1,d,c)};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(a,d,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,d,c){RemoteFile.call(this,a,d,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,d,c){};
+RemoteLibrary.prototype.saveAs=function(a,d,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,d,c){StorageFile.call(this,a,d,c);a=c;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,c){return!1};UrlLibrary.prototype.saveAs=function(a,d,c){};UrlLibrary.prototype.open=function(){};/*
mxClient.IS_IOS || */
-var StorageDialog=function(a,e,c){function b(b,m,f,k,q,v){function n(){mxEvent.addListener(p,"click",null!=v?v:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);e()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);e()})):
-(a.setMode(f,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}++l>c&&(mxUtils.br(d),l=0);var p=document.createElement("a");p.style.overflow="hidden";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.marginTop="8px";p.style.marginBottom="0px";p.style.padding="8px 10px 8px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace=
-"nowrap";p.setAttribute("title",m);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.overflow="hidden";t.style.position="absolute";t.style.bottom="8px";t.style.left="0px";t.style.right="0px";mxUtils.write(t,m);p.appendChild(t);if(null!=b){var z=document.createElement("img");z.setAttribute("src",b);z.setAttribute("border","0");z.setAttribute("align","absmiddle");z.style.width="60px";z.style.height="60px";z.style.paddingBottom=
-"6px";p.appendChild(z)}else t.style.paddingTop="5px",t.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(t.style.paddingTop="0px",t.style.marginTop="-2px");if(null!=q)for(b=0;b<q.length;b++)mxUtils.br(t),mxUtils.write(t,q[b]);if(null!=k&&null==a[k]){z.style.visibility="hidden";mxUtils.setOpacity(t,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,
-hwaccel:!1,top:"40%",zIndex:2E9});u.spin(p);var C=window.setTimeout(function(){null==a[k]&&(u.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(d,b){null!=a[k]&&b.getProperty("client")==a[k]&&(window.clearTimeout(C),mxUtils.setOpacity(t,100),z.style.visibility="",u.stop(),n(),"drive"==k&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else n();d.appendChild(p)}c=null!=c?c:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
-"nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var f=document.createElement("div");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="10px 0px 20px 0px";mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");var l=0,d=document.createElement("div");d.style.paddingTop="2px";f.appendChild(d);var g=document.createElement("p"),m=document.createElement("p");m.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";
-mxUtils.write(m,mxResources.get("saveDiagramsTo")+":");k.appendChild(m);k.appendChild(f);l=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||
+var StorageDialog=function(a,d,c){function b(b,k,f,g,t,v){function m(){mxEvent.addListener(p,"click",null!=v?v:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);d()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,!0);d()})):
+(a.setMode(f,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}++l>c&&(mxUtils.br(n),l=0);var p=document.createElement("a");p.style.overflow="hidden";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.marginTop="8px";p.style.marginBottom="0px";p.style.padding="8px 10px 8px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace=
+"nowrap";p.setAttribute("title",k);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";q.style.position="absolute";q.style.bottom="8px";q.style.left="0px";q.style.right="0px";mxUtils.write(q,k);p.appendChild(q);if(null!=b){var u=document.createElement("img");u.setAttribute("src",b);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom=
+"6px";p.appendChild(u)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");if(null!=t)for(b=0;b<t.length;b++)mxUtils.br(q),mxUtils.write(q,t[b]);if(null!=g&&null==a[g]){u.style.visibility="hidden";mxUtils.setOpacity(q,10);var z=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,
+hwaccel:!1,top:"40%",zIndex:2E9});z.spin(p);var C=window.setTimeout(function(){null==a[g]&&(z.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,c){null!=a[g]&&c.getProperty("client")==a[g]&&(window.clearTimeout(C),mxUtils.setOpacity(q,100),u.style.visibility="",z.stop(),m(),"drive"==g&&null!=e.parentNode&&e.parentNode.removeChild(e))}))}else m();n.appendChild(p)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
+"nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=document.createElement("div");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="10px 0px 20px 0px";mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");var l=0,n=document.createElement("div");n.style.paddingTop="2px";f.appendChild(n);var e=document.createElement("p"),k=document.createElement("p");k.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";
+mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);g.appendChild(f);l=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||
b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");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("decideLater"));mxEvent.addListener(f,"click",function(){a.hideDialog();var d=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=d});k.appendChild(f);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(g.style.padding="7px",g.style.fontSize=
-"9pt",g.style.marginTop="-14px",g.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(g))},5E3);this.container=k},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp){var c=a.addLanguageMenu(e,!0);null!=c&&(c.style.bottom="19px")}a.getServiceCount();var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="32px";b.style.height="32px";b.style.marginRight="8px";b.style.marginTop="-4px";var k=document.createElement("div");k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";c="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",c=mxResources.get("googleDrive")):
+mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("decideLater"));mxEvent.addListener(f,"click",function(){a.hideDialog();var e=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=e});g.appendChild(f);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(e.style.padding="7px",e.style.fontSize=
+"9pt",e.style.marginTop="-14px",e.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>",g.appendChild(e))},5E3);this.container=g},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp){var c=a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px")}a.getServiceCount();var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="32px";b.style.height="32px";b.style.marginRight="8px";b.style.marginTop="-4px";var g=document.createElement("div");g.style.margin="8px 0px 0px 0px";g.style.padding="18px 0px 24px 0px";c="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",c=mxResources.get("googleDrive")):
a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",c=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",c=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",c=mxResources.get("github")):a.mode==App.MODE_GITLAB?(b.src=IMAGE_PATH+"/gitlab-logo.svg",c=mxResources.get("gitlab")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",c=mxResources.get("browser")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+
-"/trello-logo.svg",c=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",c=mxResources.get("device"));var f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="8px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 56px 0px",f.style.marginBottom="12px";else{k.style.border="1px solid #d3d3d3";k.style.borderWidth=
-"1px 0px 1px 0px";var l=document.createElement("table"),d=document.createElement("tbody"),g=document.createElement("tr"),m=document.createElement("td"),n=document.createElement("td");l.setAttribute("align","center");m.appendChild(b);b=document.createElement("div");b.style.fontSize="22px";b.style.paddingBottom="6px";b.style.color="gray";mxUtils.write(b,c);n.style.textAlign="left";n.appendChild(b);g.appendChild(m);g.appendChild(n);d.appendChild(g);l.appendChild(d);e.appendChild(l);c=document.createElement("span");
-c.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0)");mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});e.appendChild(c)}mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(f.style.width="340px");mxUtils.write(f,mxResources.get("createNewDiagram"));
-mxEvent.addListener(f,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(f);mxUtils.br(k);f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="22px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";mxClient.IS_QUIRKS&&(f.style.width="340px");mxUtils.write(f,mxResources.get("openExistingDiagram"));mxEvent.addListener(f,"click",function(){a.actions.get("open").funct()});k.appendChild(f);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):
-a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(c=function(d){f.style.marginBottom="24px";var b=document.createElement("a");b.style.display=
-"inline-block";b.style.color="gray";b.style.cursor="pointer";b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));f.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){d()})});k.appendChild(b)},a.mode==App.MODE_GOOGLE&&null!=a.drive){var p=a.drive.getUsersList();if(0<p.length){b=document.createElement("span");b.style.marginTop="6px";mxUtils.write(b,mxResources.get("changeUser")+":");f.style.marginBottom=
-"16px";k.style.paddingBottom="18px";k.appendChild(b);var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(c=0;c<p.length;c++)l=document.createElement("option"),mxUtils.write(l,p[c].displayName),l.value=c,t.appendChild(l),l=document.createElement("option"),l.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(l,"<"+p[c].email+">"),l.setAttribute("disabled","disabled"),t.appendChild(l);l=document.createElement("option");mxUtils.write(l,mxResources.get("addAccount"));l.value=
-p.length;t.appendChild(l);mxEvent.addListener(t,"change",function(){var d=t.value,b=p.length!=d;b&&a.drive.setUser(p[d]);a.drive.authorize(b,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(d){a.handleError(d,null,function(){a.hideDialog();a.showSplash()})},!0)});k.appendChild(t)}else c(function(){a.drive.logout()})}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?c(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();
-a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});e.appendChild(k);this.container=e},EmbedDialog=function(a,e,c,b,k,f,l){l=null!=l?l:"Check out the diagram I made using @drawio";
-b=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=f?mxUtils.write(b,f):mxUtils.write(b,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(e.length));b.appendChild(f);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");b.appendChild(g);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var b=
-5E5>e.length?g.value:e;if(null!=k)k(b);else if(d)try{var m=a.openLink(b);null!=m&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=m.location.href&&m.location.href.substring(0,8)!=b.substring(0,8)&&(m.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",f.appendChild(m));if(!d||7500<e.length){var n=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",e,"text/plain")});n.className="geBtn";f.appendChild(n)}if(d&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var p=mxUtils.button("",function(){try{var d="https://www.facebook.com/sharer.php?p[url]="+
-encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img");n.setAttribute("src",Editor.facebookImage);n.setAttribute("width","18");n.setAttribute("height","18");n.setAttribute("border","0");p.appendChild(n);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>
-e.length&&(p=mxUtils.button("",function(){try{var d="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(g.value);a.openLink(d)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),n=document.createElement("img"),n.setAttribute("src",Editor.tweetImage),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("border","0"),n.style.marginBottom="5px",p.appendChild(n),p.setAttribute("title",mxResources.get("twitter")+
-" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(n);p=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
-5E5>e.length?mxClient.IS_SF||null!=document.documentMode?n.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",n.className="geBtn"):(f.appendChild(m),n.className="geBtn",m.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,e){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(B.checked&&""!=t.value){var d="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(d+="&title="+encodeURIComponent(a));0<C.length&&(d+="&s="+C);""!=u.value&&"0"!=u.value&&(d+="&border="+u.value);""!=p.value&&(d+="&height="+p.value);d+="&pan="+(q.checked?"1":"0");d+="&zoom="+(v.checked?"1":"0");d+="&fit="+(z.checked?"1":"0");
-d+="&resize="+(A.checked?"1":"0");d+="&x0="+Number(n.value);d+="&y0="+g;k.mathEnabled&&(d+="&math=1");y.checked?d+="&edit=_blank":x.checked&&(d+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=d}else D.constructor==DriveFile||D.constructor==DropboxFile?(d="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?d+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(d+=D.getHash().substring(1),d=D.constructor==DropboxFile?d+"&type=2":d+"&type=1"),null!=
-a&&(d+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(n.value),d+="&height="+a),m.value=d):m.value=""}var b=document.createElement("div"),k=a.editor.graph,f=k.getGraphBounds(),l=k.view.scale,d=Math.floor(f.x/l-k.view.translate.x),g=Math.floor(f.y/l-k.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
-b.appendChild(m);mxUtils.br(b);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=d;b.appendChild(n);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type",
-"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";
-b.appendChild(t);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";b.appendChild(q);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,
-mxResources.get("asNew")+" ");mxUtils.br(b);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";b.appendChild(A);mxUtils.write(b,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";b.appendChild(z);mxUtils.write(b,mxResources.get("fit")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft=
-"8px";b.appendChild(B);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);c();
-mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";f.appendChild(l);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,e,c){var b=document.createElement("div");b.style.textAlign=
-"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var f=new Graph(e);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";f.cellRenderer.installCellOverlayListeners=
-function(a,d,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){d.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
-!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var d=f.getDefaultParent(),g=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var e=f.getCellGeometry(a),m;p(function(){m=f.insertVertex(d,null,"Entry",e.x,e.y,80,30,"rounded=1;");g(m);f.view.refresh(m);
-f.insertEdge(d,null,"",a,m,l)},function(){f.scrollCellToVisible(m)})});b.addListener("pointerdown",function(a,d){var b=d.getProperty("event"),c=d.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var e=mxUtils.convertPoint(f.container,mxEvent.getClientX(b),mxEvent.getClientY(b));f.connectionHandler.start(c,e.x,e.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var m;try{m=f.insertVertex(d,null,"Start",
-0,0,80,30,"ellipse"),g(m)}finally{f.getModel().endUpdate()}var n;"horizontalTree"==c?(n=new mxCompactTreeLayout(f),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(n=new mxCompactTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(n=new mxRadialTreeLayout(f,!1),n.edgeRouting=!1,n.levelDistance=80):"verticalFlow"==c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-c?n=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(n=new mxFastOrganicLayout(f,!1),n.forceConstant=80):"circle"==c&&(n=new mxCircleLayout(f));if(null!=n){var p=function(a,d){f.getModel().beginUpdate();try{null!=a&&a(),n.execute(f.getDefaultParent(),m)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=d&&d()}));b.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,d,b,c,e){t.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var q=mxUtils.button(mxResources.get("insert"),function(d){f.clearCellOverlays();
-var b=f.getModel().getChildren(f.getDefaultParent());d=mxEvent.isAltDown(d)?a.editor.graph.getFreeInsertPoint():a.editor.graph.getCenterInsertPoint(f.getBoundingBoxFromGeometry(b,!0));b=a.editor.graph.importCells(b,d.x,d.y);d=a.editor.graph.view;var c=d.getBounds(b);c.x-=d.translate.x;c.y-=d.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=e.parentNode&&(f.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(q);q.className="geBtn gePrimaryBtn";
+"/trello-logo.svg",c=mxResources.get("trello")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",g.style.paddingBottom="10px",g.style.paddingTop="30px",c=mxResources.get("device"));var f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="8px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)g.style.padding="42px 0px 56px 0px",f.style.marginBottom="12px";else{g.style.border="1px solid #d3d3d3";g.style.borderWidth=
+"1px 0px 1px 0px";var l=document.createElement("table"),n=document.createElement("tbody"),e=document.createElement("tr"),k=document.createElement("td"),m=document.createElement("td");l.setAttribute("align","center");k.appendChild(b);b=document.createElement("div");b.style.fontSize="22px";b.style.paddingBottom="6px";b.style.color="gray";mxUtils.write(b,c);m.style.textAlign="left";m.appendChild(b);e.appendChild(k);e.appendChild(m);n.appendChild(e);l.appendChild(n);d.appendChild(l);c=document.createElement("span");
+c.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0)");mxUtils.write(c,mxResources.get("changeStorage"));mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)});d.appendChild(c)}mxClient.IS_QUIRKS&&(g.style.whiteSpace="nowrap",g.style.cssFloat="left");mxClient.IS_QUIRKS&&(f.style.width="340px");mxUtils.write(f,mxResources.get("createNewDiagram"));
+mxEvent.addListener(f,"click",function(){a.hideDialog();a.actions.get("new").funct()});g.appendChild(f);mxUtils.br(g);f=document.createElement("button");f.className="geBigButton";f.style.marginBottom="22px";f.style.fontSize="18px";f.style.padding="10px";f.style.width="340px";mxClient.IS_QUIRKS&&(f.style.width="340px");mxUtils.write(f,mxResources.get("openExistingDiagram"));mxEvent.addListener(f,"click",function(){a.actions.get("open").funct()});g.appendChild(f);a.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):
+a.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?mxResources.get("github"):a.mode==App.MODE_GITLAB?mxResources.get("gitlab"):a.mode==App.MODE_TRELLO?mxResources.get("trello"):a.mode==App.MODE_DEVICE?mxResources.get("device"):a.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(c=function(e){f.style.marginBottom="24px";var b=document.createElement("a");b.style.display=
+"inline-block";b.style.color="gray";b.style.cursor="pointer";b.style.marginTop="6px";mxUtils.write(b,mxResources.get("signOut"));f.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(b,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){e()})});g.appendChild(b)},a.mode==App.MODE_GOOGLE&&null!=a.drive){var p=a.drive.getUsersList();if(0<p.length){b=document.createElement("span");b.style.marginTop="6px";mxUtils.write(b,mxResources.get("changeUser")+":");f.style.marginBottom=
+"16px";g.style.paddingBottom="18px";g.appendChild(b);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(c=0;c<p.length;c++)l=document.createElement("option"),mxUtils.write(l,p[c].displayName),l.value=c,q.appendChild(l),l=document.createElement("option"),l.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(l,"<"+p[c].email+">"),l.setAttribute("disabled","disabled"),q.appendChild(l);l=document.createElement("option");mxUtils.write(l,mxResources.get("addAccount"));l.value=
+p.length;q.appendChild(l);mxEvent.addListener(q,"change",function(){var e=q.value,b=p.length!=e;b&&a.drive.setUser(p[e]);a.drive.authorize(b,function(){a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash()},function(e){a.handleError(e,null,function(){a.hideDialog();a.showSplash()})},!0)});g.appendChild(q)}else c(function(){a.drive.logout()})}else a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?c(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?c(function(){a.gitHub.logout();
+a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_GITLAB&&null!=a.gitLab?c(function(){a.gitLab.logout();a.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&c(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&c(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")});d.appendChild(g);this.container=d},EmbedDialog=function(a,d,c,b,g,f,l){l=null!=l?l:"Check out the diagram I made using @drawio";
+b=document.createElement("div");var n=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=f?mxUtils.write(b,f):mxUtils.write(b,mxResources.get(5E5>d.length?n?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);f=document.createElement("div");f.style.position="absolute";f.style.top="30px";f.style.right="30px";f.style.color="gray";mxUtils.write(f,a.formatFileSize(d.length));b.appendChild(f);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");b.appendChild(e);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(e.value=d,e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+e.select():document.execCommand("selectAll",!1,null)):(e.setAttribute("readonly","true"),e.value=mxResources.get("tooLargeUseDownload"))},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var k=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!n||navigator.standalone||!(n||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var b=
+5E5>d.length?e.value:d;if(null!=g)g(b);else if(n)try{var k=a.openLink(b);null!=k&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=k.location.href&&k.location.href.substring(0,8)!=b.substring(0,8)&&(k.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var m=window.open(),m=null!=m?m.document:null;null!=m?(m.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),m.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",f.appendChild(k));if(!n||7500<d.length){var m=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",d,"text/plain")});m.className="geBtn";f.appendChild(m)}if(n&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var p=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+
+encodeURIComponent(e.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img");m.setAttribute("src",Editor.facebookImage);m.setAttribute("width","18");m.setAttribute("height","18");m.setAttribute("border","0");p.appendChild(m);p.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";f.appendChild(p)}7168>
+d.length&&(p=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent(l)+"&url="+encodeURIComponent(e.value);a.openLink(b)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}}),m=document.createElement("img"),m.setAttribute("src",Editor.tweetImage),m.setAttribute("width","18"),m.setAttribute("height","18"),m.setAttribute("border","0"),m.style.marginBottom="5px",p.appendChild(m),p.setAttribute("title",mxResources.get("twitter")+
+" ("+a.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",f.appendChild(p))}m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(m);p=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
+5E5>d.length?mxClient.IS_SF||null!=document.documentMode?m.className="geBtn gePrimaryBtn":(f.appendChild(p),p.className="geBtn gePrimaryBtn",m.className="geBtn"):(f.appendChild(k),m.className="geBtn",k.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(z.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<C.length&&(b+="&s="+C);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=p.value&&(b+="&height="+p.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(B.checked?"1":"0");
+b+="&resize="+(A.checked?"1":"0");b+="&x0="+Number(m.value);b+="&y0="+e;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+a&&(b+="&title="+encodeURIComponent(a)),""!=p.value&&(a=parseInt(p.value)+parseInt(m.value),b+="&height="+a),k.value=b):k.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),l=g.view.scale,n=Math.floor(f.x/l-g.view.translate.x),e=Math.floor(f.y/l-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
+b.appendChild(k);mxUtils.br(b);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","4");m.style.marginRight="16px";m.style.marginLeft="4px";m.value=n;b.appendChild(m);mxUtils.write(b,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type",
+"text");p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(f.height/l);b.appendChild(p);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";
+b.appendChild(q);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";b.appendChild(t);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);b.appendChild(y);mxUtils.write(b,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,
+mxResources.get("asNew")+" ");mxUtils.br(b);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";b.appendChild(A);mxUtils.write(b,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";b.appendChild(B);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var C=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(q,"change",c);c();
+mxEvent.addListener(k,"click",function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";f.appendChild(l);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign=
+"right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var f=new Graph(d);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";f.cellRenderer.installCellOverlayListeners=
+function(a,e,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){e.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
+!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=f.getDefaultParent(),e=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),k;p(function(){k=f.insertVertex(n,null,"Entry",d.x,d.y,80,30,"rounded=1;");e(k);f.view.refresh(k);
+f.insertEdge(n,null,"",a,k,l)},function(){f.scrollCellToVisible(k)})});b.addListener("pointerdown",function(a,e){var b=e.getProperty("event"),c=e.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var d=mxUtils.convertPoint(f.container,mxEvent.getClientX(b),mxEvent.getClientY(b));f.connectionHandler.start(c,d.x,d.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var k;try{k=f.insertVertex(n,null,"Start",
+0,0,80,30,"ellipse"),e(k)}finally{f.getModel().endUpdate()}var m;"horizontalTree"==c?(m=new mxCompactTreeLayout(f),m.edgeRouting=!1,m.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(m=new mxCompactTreeLayout(f,!1),m.edgeRouting=!1,m.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(m=new mxRadialTreeLayout(f,!1),m.edgeRouting=!1,m.levelDistance=80):"verticalFlow"==c?m=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+c?m=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(m=new mxFastOrganicLayout(f,!1),m.forceConstant=80):"circle"==c&&(m=new mxCircleLayout(f));if(null!=m){var p=function(a,e){f.getModel().beginUpdate();try{null!=a&&a(),m.execute(f.getDefaultParent(),k)}catch(A){throw A;}finally{var b=new mxMorphing(f);b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=e&&e()}));b.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,e,b,c,d){q.apply(this,arguments);p()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(e){f.clearCellOverlays();
+var b=f.getModel().getChildren(f.getDefaultParent());e=mxEvent.isAltDown(e)?a.editor.graph.getFreeInsertPoint():a.editor.graph.getCenterInsertPoint(f.getBoundingBoxFromGeometry(b,!0));b=a.editor.graph.importCells(b,e.x,e.y);e=a.editor.graph.view;var c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(t);t.className="geBtn gePrimaryBtn";
a.editor.cancelFirst||b.appendChild(u)};this.container=b};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(a,e,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var k=document.createElement("h2");mxUtils.write(k,mxResources.get("backgroundImage"));k.style.marginTop="0px";b.appendChild(k);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=null!=c?c.src:"";var l=!1,d=!1,
-g=function(b,c){null!=b&&d||(f.value=mxUtils.trim(f.value),l||""==f.value||a.isOffline()?(m.value="",n.value="",null!=c&&c("")):a.loadImage(f.value,function(a){m.value=a.width;n.value=a.height;null!=c&&c(f.value)},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));m.value="";n.value="";null!=c&&c(null)}))};this.init=function(){f.focus();if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=b.parentNode,c=null;
-mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(d));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(d){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<d.dataTransfer.files.length)a.importFiles(d.dataTransfer.files,0,0,a.maxBackgroundSize,
-function(a,d,b,c,e,m){f.value=a;g()},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(d.dataTransfer.types,"text/uri-list")){var b=d.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&(f.value=decodeURIComponent(b),g())}d.stopPropagation();d.preventDefault()}),!1)}};b.appendChild(f);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+
-":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.width:"";b.appendChild(m);mxUtils.write(b,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=c?c.height:"";b.appendChild(n);c=mxUtils.button(mxResources.get("reset"),function(){f.value="";m.value="";n.value=
-"";l=!1});mxEvent.addGestureListeners(c,function(){l=!0});c.className="geBtn";c.width="100";b.appendChild(c);mxUtils.br(b);mxEvent.addListener(f,"change",g);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&&(f.value=a.url,g()));f.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){l=!0;a.hideDialog()});
-k.className="geBtn";a.editor.cancelFirst&&c.appendChild(k);applyBtn=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();g(null,function(a){e(""!=a&&null!=a?new mxImage(f.value,m.value,n.value):null,null==a)})});mxEvent.addGestureListeners(applyBtn,function(){d=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);a.editor.cancelFirst||c.appendChild(k);b.appendChild(c);this.container=b},ParseDialog=function(a,e,c){function b(d,b,c){var e=d.split("\n");if("plantUmlPng"==
-b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var g=function(d,b,e,g,n){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,g,n));var p=null;m.getModel().beginUpdate();try{p="txt"==b?a.insertAsPreText(e,f.x,f.y):m.insertVertex(null,null,null,f.x,f.y,g,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:d,format:b},null,
-2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=a.editor.graph,n="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"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"==d&&"svg"==n?window.setTimeout(function(){a.spinner.stop();g(d,n,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):a.generatePlantUmlImage(d,n,function(b,c,e){a.spinner.stop();g(d,n,b,c,e)},function(d){a.handleError(d)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(m=a.editor.graph,a.generateMermaidImage(d,n,function(b,e,g){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,e,g));a.spinner.stop();var n=null;m.getModel().beginUpdate();try{n=m.insertVertex(null,null,null,f.x,f.y,e,g,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-b+";"),m.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=n&&(m.setSelectionCell(n),m.scrollCellToVisible(n))},function(d){a.handleError(d)}));else if("table"==b){var p=null,k=[],t=0;for(b=0;b<e.length;b++){var l=mxUtils.trim(e[b]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),p=new mxCell(l,new mxGeometry(t,
-0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,k.push(p),l=a.editor.graph.getPreferredSizeForCell(q),null!=l&&(p.geometry.width=l.width+10);else if(null!=p&&")"==l.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=l&&null!=p&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var u=l.toLowerCase().indexOf("primary key"),
-l=l.replace(/primary key/i,""),q=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<u?"1":"0")+";");q.vertex=!0;var H=new mxCell(0<u?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<u?"fontStyle=1;":""));H.vertex=!0;q.insert(H);l=new mxCell(l,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<u?"fontStyle=5;":""));l.vertex=!0;q.insert(l);l=a.editor.graph.getPreferredSizeForCell(l);null!=l&&p.geometry.width<l.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,l.width+30)));p.insert(q);p.geometry.height+=30}}0<k.length&&(m=a.editor.graph,f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),m.setSelectionCells(m.importCells(k,
-f.x,f.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==b){if(0<e.length){m=a.editor.graph;q=null;k=[];for(b=p=0;b<e.length;b++)";"!=e[b].charAt(0)&&(0==e[b].length?q=null:null==q?(q=new mxCell(e[b],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;"),q.vertex=!0,k.push(q),l=m.getPreferredSizeForCell(q),null!=l&&q.geometry.width<l.width+10&&(q.geometry.width=
-l.width+10),p+=q.geometry.width+40):"--"==e[b]?(l=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;"),l.vertex=!0,q.geometry.height+=l.geometry.height,q.insert(l)):0<e[b].length&&(t=new mxCell(e[b],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-t.vertex=!0,l=m.getPreferredSizeForCell(t),null!=l&&t.geometry.width<l.width&&(t.geometry.width=l.width),q.geometry.width=Math.max(q.geometry.width,t.geometry.width),q.geometry.height+=t.geometry.height,q.insert(t)));if(0<k.length){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0));m.getModel().beginUpdate();try{k=m.importCells(k,f.x,f.y);l=[];for(b=0;b<k.length;b++)l.push(k[b]),l=l.concat(k[b].children);m.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{m.getModel().endUpdate()}m.setSelectionCells(k);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var q=function(a){var d=I[a];null==d&&(d=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),d.vertex=!0,I[a]=d,k.push(d));return d},I={},k=[];for(b=0;b<e.length;b++)if(";"!=e[b].charAt(0)){var K=e[b].split("->");2<=K.length&&(u=q(K[0]),H=q(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,u.insertEdge(K,!0),H.insertEdge(K,!1),k.push(K))}if(0<k.length){e=document.createElement("div");e.style.visibility="hidden";
-document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{k=m.importCells(k);for(b=0;b<k.length;b++)m.getModel().isVertex(k[b])&&(l=m.getPreferredSizeForCell(k[b]),k[b].geometry.width=Math.max(k[b].geometry.width,l.width),k[b].geometry.height=Math.max(k[b].geometry.height,l.height));p=new mxFastOrganicLayout(m);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(m.getDefaultParent());t=new mxParallelEdgeLayout(m);t.spacing=20;t.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
-l=[];a.editor.graph.getModel().beginUpdate();try{k=m.getModel().getChildren(m.getDefaultParent()),f=mxEvent.isAltDown(c)?f:a.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(k,!0)),l=a.editor.graph.importCells(k,f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
-d.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"==d.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==d.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"==d.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"==d.value||"plantUmlTxt"==d.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 f=a.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height="354px";l.style.marginBottom="16px";var d=document.createElement("select");if("formatSql"==c||"mermaid"==c)d.style.display="none";var g=document.createElement("option");g.setAttribute("value","list");mxUtils.write(g,mxResources.get("list"));"plantUml"!=c&&d.appendChild(g);
-null!=c&&"fromText"!=c||g.setAttribute("selected","selected");g=document.createElement("option");g.setAttribute("value","table");mxUtils.write(g,mxResources.get("formatSql"));"formatSql"==c&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","mermaid");mxUtils.write(g,mxResources.get("formatSql"));"mermaid"==c&&(d.appendChild(g),g.setAttribute("selected","selected"));g=document.createElement("option");g.setAttribute("value","diagram");
-mxUtils.write(g,mxResources.get("diagram"));"plantUml"!=c&&d.appendChild(g);g=document.createElement("option");g.setAttribute("value","plantUmlSvg");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&g.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var n=document.createElement("option");n.setAttribute("value",
-"plantUmlTxt");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(d.appendChild(g),d.appendChild(m),d.appendChild(n));var p=k();l.value=p;e.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
-a.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){l.value=a.target.result};d.readAsText(a)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var a=k();if(0==l.value.length||l.value==p)p=a,l.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),
-function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});g.className="geBtn";a.editor.cancelFirst&&e.appendChild(g);m=mxUtils.button(mxResources.get("insert"),function(c){a.hideDialog();b(l.value,d.value,c)});e.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);this.container=e},NewDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(){var a=!0;if(null!=N)for(;I<N.length&&(a||0!=mxUtils.mod(I,30));){var d=
-N[I++],d=B(d.url,d.libs,d.title,d.tooltip?d.tooltip:d.title,d.select,d.imgUrl,d.info,d.onClick,d.preview,d.noImg,d.clibs);a&&d.click();a=!1}}function A(){if(ba)c||a.hideDialog(),u(ba,T,H.value);else if(b)c||a.hideDialog(),b(U,H.value);else{var d=H.value;null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,U,null!=Y&&0<Y.length?Y:null,null,function(){a.hideDialog()},null,b,null,null!=V&&0<V.length?V:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function z(a,
-b,c,e,m,f){null!=Z&&(Z.style.backgroundColor="transparent",Z.style.border="1px solid transparent");G.removeAttribute("disabled");U=b;Y=c;V=f;Z=a;ba=e;T=m;Z.style.backgroundColor=d;Z.style.border=g}function B(d,b,c,e,g,m,f,n,p,k,t){var l=document.createElement("div");l.className="geTemplate";l.style.height=M+"px";l.style.width=ga+"px";"dark"==uiTheme&&(l.style.filter="invert(100%)");null!=c?l.setAttribute("title",mxResources.get(c,null,c)):null!=e&&0<e.length&&l.setAttribute("title",e);if(null!=m)l.style.backgroundImage=
-"url("+m+")",l.style.backgroundSize="contain",l.style.backgroundPosition="center center",l.style.backgroundRepeat="no-repeat",mxEvent.addListener(l,"click",function(a){z(l,null,null,d,f,t)}),mxEvent.addListener(l,"dblclick",function(a){A()});else if(!k&&null!=d&&0<d.length){e=p||TEMPLATE_PATH+"/"+d.substring(0,d.length-4)+".png";l.style.backgroundImage="url("+e+")";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";null!=c&&(l.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+
-("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var I=!1;mxEvent.addListener(l,"click",function(c){G.setAttribute("disabled","disabled");l.style.backgroundColor="transparent";l.style.border=
-"1px solid transparent";c=d;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;K.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){K.stop();200<=a.getStatus()&&299>=a.getStatus()&&(z(l,a.getText(),b,null,null,t),I&&A())}))});mxEvent.addListener(l,"dblclick",function(a){I=!0})}else l.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(M-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",g&&z(l),null!=n?mxEvent.addListener(l,"click",n):(mxEvent.addListener(l,"click",function(a){z(l,null,null,d,f)}),mxEvent.addListener(l,"dblclick",function(a){A()}));P.appendChild(l);return l}function C(){sa&&(sa=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<da){var d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
-mxUtils.write(d,mxResources.get("custom"));Q.appendChild(d);for(var b in X){var c=document.createElement("div"),d=b,e=X[b];18<d.length&&(d=d.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",d+" ("+e.length+")");mxUtils.write(c,c.getAttribute("title"));null!=m&&(c.style.padding=m);Q.appendChild(c);(function(d,b){mxEvent.addListener(c,"click",function(){a!=
-b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",I=0,N=X[d],O=null,y())})})(b,c)}d=document.createElement("div");d.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(d,"draw.io");Q.appendChild(d)}for(b in R)c=document.createElement("div"),d=mxResources.get(b),e=R[b],null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1)),18<d.length&&(d=d.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
-c.setAttribute("title",d+" ("+e.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=m&&(c.style.padding=m),Q.appendChild(c),null==a&&0<e.length&&(a=c,a.style.backgroundColor=l,N=e),function(d,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,P.scrollTop=0,P.innerHTML="",I=0,N=R[d],O=null,y())})}(b,c);y()}c=null!=c?c:!0;k=null!=k?k:!1;l=null!=l?l:"#ebf2f9";d=null!=d?d:"dark"==uiTheme?"#a2a2a2":"#e6eff8";g=null!=g?g:"dark"==uiTheme?"1px dashed #00a8ff":
-"1px solid #ccd9ea";n=null!=n?n:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";c&&D.appendChild(E);var F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.width="40px";F.style.height="40px";F.style.marginRight="10px";F.style.paddingBottom="4px";F.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?
-IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&c&&E.appendChild(F);c&&mxUtils.write(E,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+
-":");F=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?F=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?F=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?F=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?F=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?F=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(F=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",a.defaultFilename+F);H.style.marginLeft="10px";
-H.style.width=e?"144px":"244px";this.init=function(){c&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};c&&(E.appendChild(H),null!=a.editor.diagramFileTypes&&(F=FilenameDialog.createFileTypes(a,H,a.editor.diagramFileTypes),F.style.marginLeft="6px",F.style.width=e?"80px":"180px",E.appendChild(F)),null!=a.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(a,H,a.editor.fileExtensions),F.style.marginTop=
-"12px",E.appendChild(F)));var E=!1,I=0,K=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}),G=mxUtils.button(v||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");A();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(p||t){var L=[],O=null,J=null,S=null,W=function(a){G.setAttribute("disabled","disabled");for(var d=0;d<L.length;d++)L[d].className=d==a?"geBtn gePrimaryBtn":"geBtn"},
-E=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";P.style.left="160px";W(0);P.scrollTop=0;P.innerHTML="";I=0;O!=N&&(N=O,R=J,da=S,Q.innerHTML="",C(),O=null)});L.push(F);v.appendChild(F);var aa=function(a){Q.style.display="none";P.style.left="30px";W(a?-1:1);null==O&&(O=N);P.scrollTop=0;P.innerHTML="";K.spin(P);var d=function(a,d,b){I=0;K.stop();N=a;b=b||
-{};var c=0,e;for(e in b)c+=b[e].length;if(d)P.innerHTML=d;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){Q.style.display="";P.style.left="160px";Q.innerHTML="";da=0;R={"draw.io":a};for(e in b)R[e]=b[e];C()}else y()};a?t(ca.value,d):p(d)};p&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){aa()}),v.appendChild(F),L.push(F));if(t){F=document.createElement("span");F.style.marginLeft="10px";
-F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(F);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(a){13==a.keyCode&&aa(!0)});v.appendChild(ca);F=mxUtils.button(mxResources.get("search"),function(){aa(!0)});F.className="geBtn";v.appendChild(F)}W(0)}var Y=null,V=null,U=null,Z=null,ba=null,T=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
-P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(E?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var M=140,ga=140,R={},X={},da=0,sa=!0;R.basic=[{title:"blankDiagram",select:!0}];var N=R.basic;if(!e){var ia=function(){mxUtils.get(ea,
-function(a){if(!fa){fa=!0;a=a.getXml().documentElement.firstChild;for(var d={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var b=a.getAttribute("name"),c=a.getElementsByTagName("add"),e=[],g=0;g<c.length;g++)e.push(encodeURIComponent(mxUtils.getTextContent(c[g])));null!=b&&0<e.length&&(d[b]=e.join(";"))}else b=a.getAttribute("url"),null!=b&&(c=a.getAttribute("section"),null==c&&(c=b.indexOf("/"),c=b.substring(0,c)),b=R[c],null==b&&(b=[],R[c]=b),c=a.getAttribute("clibs"),
-null!=d[c]&&(c=d[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}K.stop();C()}})};D.appendChild(Q);D.appendChild(P);var fa=!1,ea=n;/^https?:\/\//.test(ea)&&!a.editor.isCorsEnabledForUrl(ea)&&(ea=PROXY_URL+"?url="+encodeURIComponent(ea));K.spin(P);null!=x?x(function(a,d){X=a;S=da=d;ia()},ia):ia();J=R}mxEvent.addListener(H,"keypress",function(d){a.dialog.container.firstChild==
-D&&13==d.keyCode&&A()});n=document.createElement("div");n.style.marginTop=e?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";e||a.isOffline()||!c||null!=b||k||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",n.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className=
-"geBtn";!a.editor.cancelFirst||k&&null==f||n.appendChild(x);e||"1"==urlParams.embed||k||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var d=new FilenameDialog(a,"",mxResources.get("create"),function(d){null!=d&&0<d.length&&(d=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(d)),null==a.getCurrentFile()?window.location.href=d:window.openWindow(d))},mxResources.get("url"));a.showDialog(d.container,300,80,!0,!0);d.init()}),
-e.className="geBtn",n.appendChild(e));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var d=document.createElement("input");d.setAttribute("multiple","multiple");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(b){a.openFiles(d.files,!0);d.value=""});d.style.display="none";document.body.appendChild(d);a.newDlgFileInputElt=d}a.newDlgFileInputElt.click()}),q.className="geBtn",n.appendChild(q));n.appendChild(G);a.editor.cancelFirst||
-null!=b||k&&null==f||n.appendChild(x);D.appendChild(n);this.container=D},CreateDialog=function(a,e,c,b,k,f,l,d,g,m,n,p,t,u,q,v,x){function y(d,b,c,g){function m(){mxEvent.addListener(f,"click",function(){var d=c;if(l){var b=B.value,g=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>g){var d=null!=d?d:E.value,m="";d==App.MODE_GOOGLE?m=a.drive.extension:d==App.MODE_GITHUB?m=a.gitHub.extension:d==App.MODE_GITLAB?m=a.gitLab.extension:d==App.MODE_TRELLO?m=a.trello.extension:d==App.MODE_DROPBOX?m=a.dropbox.extension:
-d==App.MODE_ONEDRIVE?m=a.oneDrive.extension:d==App.MODE_DEVICE&&(m=".drawio");0<=g&&(b=b.substring(0,g));B.value=b+m}}A(c)})}var f=document.createElement("a");f.style.overflow="hidden";var n=document.createElement("img");n.src=d;n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="60px";n.style.height="60px";n.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding=
-"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(n);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var k=document.createElement("div");f.appendChild(k);mxUtils.write(k,b);if(null!=g&&null==a[g]){n.style.visibility="hidden";mxUtils.setOpacity(k,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(f);var I=window.setTimeout(function(){null==
-a[g]&&(t.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(I),mxUtils.setOpacity(k,100),n.style.visibility="",t.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(d){var b=B.value;if(null==d||null!=b&&0<b.length)x&&a.hideDialog(),c(b,d,B)}l=null!=l?l:!0;d=null!=d?d:!0;p=null!=p?p:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var z=
-document.createElement("h2");mxUtils.write(z,k||mxResources.get("create"));z.style.marginTop="0px";z.style.marginBottom="24px";f.appendChild(z);mxUtils.write(f,mxResources.get("filename")+":");var B=document.createElement("input");B.setAttribute("value",e);B.style.width="200px";B.style.marginLeft="10px";B.style.marginBottom="20px";B.style.maxWidth="70%";this.init=function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?B.select():document.execCommand("selectAll",
-!1,null)};f.appendChild(B);null!=v&&(null!=a.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(a,B,a.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",f.appendChild(k)),f.appendChild(FilenameDialog.createTypeHint(a,B,v)));null==t||null==u||"image/"!=u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(B.style.width="160px",v=document.createElement("img"),t=q?t:btoa(unescape(encodeURIComponent(t))),v.setAttribute("src","data:"+u+";base64,"+t),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%)"),f.appendChild(v),g&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var E=document.createElement("select");E.style.marginLeft="10px";a.isOfflineApp()||
-a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),E.appendChild(u),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),E.appendChild(u),a.mode==App.MODE_ONEDRIVE&&
-u.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u,mxResources.get("dropbox")),E.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),
-u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),E.appendChild(u),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),E.appendChild(u),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",
-App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),E.appendChild(u),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),E.appendChild(u),a.mode!=App.MODE_DEVICE&&d||u.setAttribute("selected","selected"),n&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),
-App.MODE_DEVICE));d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),E.appendChild(d),a.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=m&&(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(m)}),
-n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),u.className="geBtn",d.appendChild(u));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),g.className="geBtn",d.appendChild(g));
-CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),function(){A("download")}),g.className="geBtn",d.appendChild(g));a.editor.cancelFirst||d.appendChild(n);mxEvent.addListener(B,"keypress",function(d){13==d.keyCode?A(App.MODE_DEVICE):27==d.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(d);this.container=f};CreateDialog.showDownloadButton=!0;
-var PopupDialog=function(a,e,c,b,k){k=null!=k?k:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";f.appendChild(l);mxUtils.br(f);var d=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&a.hideDialog();null!=c&&c();a.openLink(e,
-null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=l.style.width;f.appendChild(d);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,e,c,b,k,f){f=null!=f?f:!0;var l=a.editor.graph,d=document.createElement("div");mxUtils.write(d,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";mxClient.IS_VML||(e.style.paddingRight="20px");var g=document.createElement("input");g.setAttribute("value",c);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)+(mxClient.IS_QUIRKS?20:-20)+"px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";
-g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){g.value="";g.focus()});e.appendChild(g);e.appendChild(c);
-d.appendChild(e);var m=function(d,c,e,g){var m="data:"==d.substring(0,5);!a.isOffline()||m&&"undefined"===typeof chrome?0<d.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(d,function(m){a.spinner.stop();a.hideDialog();var n=!1===g?1:null!=c&&null!=e?Math.max(c/m.width,e/m.height):Math.min(1,Math.min(520/m.width,520/m.height));f&&(d=a.convertDataUri(d));b(d,Math.round(Number(m.width)*n),Math.round(Number(m.height)*n))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
-mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(d)):(d=a.convertDataUri(d),c=null==c?120:c,e=null==e?100:e,a.hideDialog(),b(d,c,e))},n=function(d,c){if(null!=d){var e=k?null:l.getModel().getGeometry(l.getSelectionCell());null!=e?m(d,e.width,e.height,c):m(d,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",
-function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(d){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<d.dataTransfer.files.length)a.importFiles(d.dataTransfer.files,0,0,a.maxImageSize,function(a,d,b,c,e,g,m,f){n(a,
-f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!mxEvent.isControlDown(d),null,null,!0);else if(0<=mxUtils.indexOf(d.dataTransfer.types,"text/uri-list")){var b=d.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(b)&&n(decodeURIComponent(b))}d.stopPropagation();d.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),
-function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url));g.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(d){null!=
-p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,d,b,c,e,g){n(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var d=0;d<a.length;d++)a[d]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var t=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});t.className="geBtn";c.appendChild(t)}document.createElement("canvas").getContext&&"data:image/"==g.value.substring(0,
-11)&&"data:image/svg"!=g.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),function(){var d=new CropImageDialog(a,g.value,function(a){g.value=a});a.showDialog(d.container,300,380,!0,!0);d.init()}),t.className="geBtn",c.appendChild(t));mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&n(g.value)});t=mxUtils.button(mxResources.get("apply"),function(){n(g.value)});t.className="geBtn gePrimaryBtn";c.appendChild(t);a.editor.cancelFirst||c.appendChild(e);Graph.fileSupport&&(c.style.marginTop=
-"120px",d.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",d.style.backgroundPosition="center 65%",d.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),d.appendChild(e));d.appendChild(c);this.container=d},LinkDialog=function(a,e,c,b,k){function f(a,d,b){b=mxUtils.button("",b);b.className=
-"geBtn";b.setAttribute("title",d);d=document.createElement("img");d.style.height="26px";d.style.width="26px";d.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(d);x.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,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";mxClient.IS_VML||(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="100%";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";var m=document.createElement("div");m.setAttribute("title",mxResources.get("reset"));
-m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display=mxClient.IS_VML?"inline":"inline-block";m.style.top=(mxClient.IS_VML?0:3)+"px";m.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(m,"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",
-"current-linkdialog");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","current-linkdialog");var t=document.createElement("select");t.style.width="100%";if(k&&null!=a.pages){null!=e&&"data:page/id,"==e.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);
-d.appendChild(g);d.appendChild(m);mxUtils.br(d);d.appendChild(p);k=!1;for(m=0;m<a.pages.length;m++){var u=document.createElement("option");mxUtils.write(u,a.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));u.setAttribute("value","data:page/id,"+a.pages[m].getId());e==u.getAttribute("value")&&(u.setAttribute("selected","selected"),k=!0);t.appendChild(u)}if(!k&&p.checked){var q=document.createElement("option");mxUtils.write(q,mxResources.get("pageNotFound"));q.setAttribute("disabled","disabled");
-q.setAttribute("selected","selected");q.setAttribute("value","pageNotFound");t.appendChild(q);mxEvent.addListener(t,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)})}d.appendChild(t)}else g.setAttribute("value",e),d.appendChild(g),d.appendChild(m);l.appendChild(d);var v=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==t.value?t.value:e:g.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
-function(){p.checked?t.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){n.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(g,"focus",function(){p.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var d=l.parentNode,b=null;mxEvent.addListener(d,"dragleave",function(a){null!=
-b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),n.setAttribute("checked",
-"checked"),n.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";x.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&x.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var d=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)?d="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(d="https://drive.google.com/#folders/"+
-a.docs[0].id);g.value=d;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
-b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(b).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED);a.linkPicker=d.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.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(a){g.value=a[0].link;g.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,d){g.value=d.value[0].webUrl;g.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
-a){a=a.split("/");var d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value="https://github.com/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var d=a[0],b=a[1],c=a[2];a=a.slice(3,a.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+d+"/"+b+"/blob/"+c+"/"+a;g.focus()}})});mxEvent.addListener(g,"keypress",function(d){13==d.keyCode&&(a.hideDialog(),b(p.checked?
-t.value:g.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(c);l.appendChild(x);this.container=l},FeedbackDialog=function(a,e,c,b){var k=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";k.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));k.appendChild(f);
-var l=document.createElement("input");l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var d=n.value+(m.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;d.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),
-a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(l.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+d),function(d){a.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});
-d.className="geBtn gePrimaryBtn";if(!c){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\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(l,"change",function(){0<l.value.length&&0<g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")});mxEvent.addListener(l,"keyup",function(){0<l.value.length&&g.test(l.value)?d.removeAttribute("disabled"):d.setAttribute("disabled",
-"disabled")})}k.appendChild(l);this.init=function(){l.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(m);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(f);mxEvent.addListener(f,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)});k.appendChild(c);f=document.createElement("div");
-mxUtils.write(f,mxResources.get("feedback"));k.appendChild(f);var n=document.createElement("textarea");n.style.resize="none";n.style.width="600px";n.style.height="140px";n.style.marginTop="6px";n.setAttribute("placeholder",mxResources.get("comments"));k.appendChild(n);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst?(c.appendChild(f),c.appendChild(d)):(c.appendChild(d),
-c.appendChild(f));k.appendChild(c);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,e,c){var b=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));b.appendChild(k);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
-"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var d=new Graph(l);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,m=null,n=0,p=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=m&&null!=m[n]?m[n].getAttribute("name"):"pagenumber"==a?n+1:"pagecount"==a?null!=m?m.length:1:p.apply(this,arguments)};d.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&d.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var t=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),q=null,v=null,x=null,y=null,A=mxUtils.button("",function(){null!=x&&d.zoomIn()});A.className="geSprite geSprite-zoomin";
-A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var z=mxUtils.button("",function(){null!=x&&d.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=x&&
-(d.maxFitScale=8,d.fit(8),d.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=x&&(d.zoomActual(),d.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled",
-"disabled");mxUtils.setOpacity(C,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var d=mxUtils.getXml(x.documentElement),b=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml"):(d=
-"undefined"===typeof pako?"&xml="+encodeURIComponent(d):"&data="+encodeURIComponent(Graph.compress(d)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+d)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(d){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(d){a.spinner.stop();a.editor.setStatus("");a.handleError(d,null!=d?mxResources.get("errorSavingFile"):null)})})});F.className="geBtn";F.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var I=null;mxEvent.addListener(H,"change",function(a){null!=
-I&&(I(a),mxEvent.consume(a))});var K=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});K.className="geBtn";K.setAttribute("disabled","disabled");null!=c&&(K.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(H.selectedIndex))});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled",
-"disabled");null!=c&&(G.style.display="none",F.className="geBtn gePrimaryBtn");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.width="640px";k.style.textAlign="right";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.padding="2px";L.style.border="none";L.style.left="199px";L.style.top="442px";var O=null;if(null!=e&&0<e.length){l.style.cursor="move";var J=document.createElement("table");J.style.border=
-"1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(g=mxUtils.indexOf(a.pages,a.currentPage));for(var aa=e.length-1;0<=aa;aa--){var ca=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(e){t.stop();var p=mxUtils.parseXml(e),k=a.editor.extractGraphModel(p.documentElement,!0);if(null!=k){var q=function(a){null!=a&&
-(a=v(Editor.parseDiagramNode(a)));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return a};H.style.display="none";H.innerHTML="";x=p;y=e;m=parseSelectFunction=null;n=0;if("mxfile"==k.nodeName){p=k.getElementsByTagName("diagram");m=[];for(e=0;e<p.length;e++)m.push(p[e]);n=Math.min(g,m.length-1);0<m.length&&q(m[n]);if(1<m.length)for(H.removeAttribute("disabled"),
-H.style.display="",e=0;e<m.length;e++)p=document.createElement("option"),mxUtils.write(p,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),p.setAttribute("value",e),e==n&&p.setAttribute("selected","selected"),H.appendChild(p);I=function(){try{var d=parseInt(H.value);n=g=d;q(m[d])}catch(X){H.value=g,a.handleError(X)}}}else v(k);e=b.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=e?e+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
-D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&F.removeAttribute("disabled"),E.removeAttribute("disabled"),G.removeAttribute("disabled"),K.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60)}else H.style.display="none",H.innerHTML="",D.innerHTML="",
-mxUtils.write(D,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):c.toDateString()===W?mxUtils.write(k,c.toLocaleTimeString()):mxUtils.write(k,c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(k);f.setAttribute("title",c.toLocaleDateString()+
-" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(t.stop(),null!=q&&(q.style.backgroundColor=""),v=b,q=f,q.style.backgroundColor="#ebf2f9",y=x=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",d.getModel().clear(),F.setAttribute("disabled","disabled"),E.setAttribute("disabled",
-"disabled"),A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),t.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(Q){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Q.message)}},
-function(a){t.stop();H.style.display="none";H.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);S.appendChild(f)}return f}(e[aa]);null!=ca&&aa==e.length-1&&(O=ca)}J.appendChild(S);f.appendChild(J)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
-a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",L.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";L.appendChild(H);L.appendChild(A);L.appendChild(z);L.appendChild(C);L.appendChild(B);a.editor.cancelFirst?(k.appendChild(f),k.appendChild(E),
-k.appendChild(K),k.appendChild(F),k.appendChild(G)):(k.appendChild(E),k.appendChild(K),k.appendChild(F),k.appendChild(G),k.appendChild(f));b.appendChild(k);b.appendChild(L);b.appendChild(D);this.container=b},DraftDialog=function(a,e,c,b,k,f,l,d,g){var m=document.createElement("div"),n=document.createElement("div");n.style.marginTop="0px";n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.lineHeight="normal";mxUtils.write(n,e);m.appendChild(n);var p=document.createElement("select"),t=mxUtils.bind(this,
-function(){A=mxUtils.parseXml(g[p.value].data);z=a.editor.extractGraphModel(A.documentElement,!0);B=0;this.init()});if(null!=g){p.style.marginLeft="4px";for(e=0;e<g.length;e++){var u=document.createElement("option");u.setAttribute("value",e);var q=new Date(g[e].created),v=new Date(g[e].modified);mxUtils.write(u,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}n.appendChild(p);mxEvent.addListener(p,
-"change",t)}null==c&&(c=g[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);m.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var A=
-mxUtils.parseXml(c),z=a.editor.extractGraphModel(A.documentElement,!0),B=0,C=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=C&&null!=C[B]?C[B].getAttribute("name"):"pagenumber"==a?B+1:"pagecount"==a?null!=C?C.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin=
-"2px";mxUtils.setOpacity(c,60);n=mxUtils.button("",function(){y.zoomOut()});n.className="geSprite geSprite-zoomout";n.setAttribute("title",mxResources.get("zoomOut"));n.style.outline="none";n.style.border="none";n.style.margin="2px";mxUtils.setOpacity(n,60);e=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);
-u=mxUtils.button("",function(){y.zoomActual();y.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);l=mxUtils.button(l||mxResources.get("discard"),function(){k.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,
-t()):a.hideDialog(!0))})])});l.className="geBtn";var E=document.createElement("select");E.style.maxWidth="80px";E.style.position="relative";E.style.top="-2px";E.style.verticalAlign="bottom";E.style.marginRight="6px";E.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";v=document.createElement("div");
-v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var d=a.getAttribute("background");if(null==d||""==d||d==mxConstants.NONE)d="dark"==uiTheme?"transparent":"#ffffff";x.style.backgroundColor=d;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}return a}function d(d){null!=d&&(d=a(Editor.parseDiagramNode(d)));
-return d}mxEvent.addListener(E,"change",function(a){B=parseInt(E.value);d(C[B]);mxEvent.consume(a)});if("mxfile"==z.nodeName){var b=z.getElementsByTagName("diagram");C=[];for(var c=0;c<b.length;c++)C.push(b[c]);0<C.length&&d(C[B]);E.innerHTML="";if(1<C.length)for(E.style.display="",c=0;c<C.length;c++)b=document.createElement("option"),mxUtils.write(b,C[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),b.setAttribute("value",c),c==B&&b.setAttribute("selected","selected"),E.appendChild(b);
-else E.style.display="none"}else a(z)};v.appendChild(E);v.appendChild(c);v.appendChild(n);v.appendChild(u);v.appendChild(e);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");a.editor.cancelFirst?(q.appendChild(c),null!=d&&q.appendChild(d),q.appendChild(l),q.appendChild(f)):(q.appendChild(f),q.appendChild(l),null!=d&&q.appendChild(d),q.appendChild(c));m.appendChild(q);
-m.appendChild(v);this.container=m},FindWindow=function(a,e,c,b,k){function f(a,d,b){if("object"===typeof d.value&&null!=d.value.attributes){d=d.value.attributes;for(var c=0;c<d.length;c++)if("label"!=d[c].nodeName){var e=mxUtils.trim(d[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&e.substring(0,b.length)===b||null!=a&&a.test(e))return!0}}return!1}function l(d){var b=g.model.getDescendants(g.model.getRoot()),c=u.value.toLowerCase(),e=q.checked?new RegExp(c):null,
-k=null;m!=c&&(m=c,n=null,p=!1);var t=null==n;if(0<c.length){if(p){p=!1;for(var z,I=0;I<a.pages.length;I++)if(a.currentPage==a.pages[I]){z=I;break}d=(z+1)%a.pages.length;n=null;do p=!1,b=a.pages[d],g=a.createTemporaryGraph(g.getStylesheet()),a.updatePageRoot(b),g.model.setRoot(b.root),d=(d+1)%a.pages.length;while(!l(!0)&&d!=z);n&&(n=null,a.selectPage(b));p=!1;g=a.editor.graph;return l(!0)}for(I=0;I<b.length;I++){z=g.view.getState(b[I]);if(null!=z&&null!=z.cell.value&&(t||null==k)&&(g.model.isVertex(z.cell)||
-g.model.isEdge(z.cell))&&(g.isHtmlLabel(z.cell)?(y.innerHTML=g.sanitizeHtml(g.getLabel(z.cell)),label=mxUtils.extractTextWithWhitespace([y])):label=g.getLabel(z.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==e&&(label.substring(0,c.length)===c||f(e,z.cell,c))||null!=e&&(e.test(label)||f(e,z.cell,c))))if(t){k=z;break}else null==k&&(k=z);t=t||z==n}}if(null!=k){if(I==b.length&&x.checked)return n=null,p=!0,l(!0);n=k;g.scrollCellToVisible(n.cell);g.isEnabled()?
-g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!d&&x.checked)return p=!0,l(!0);g.isEnabled()&&g.clearSelection()}return 0==c.length||null!=k}var d=a.actions.get("find"),g=a.editor.graph,m=null,n=null,p=!1,t=document.createElement("div");t.style.userSelect="none";t.style.overflow="hidden";t.style.padding="10px";t.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom=
-"6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";t.appendChild(u);mxUtils.br(t);var q=document.createElement("input");q.setAttribute("id","geFindWinRegExChck");q.setAttribute("type","checkbox");q.style.marginRight="4px";t.appendChild(q);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");t.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));t.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
-v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";t.appendChild(v);mxUtils.br(t);var x=document.createElement("input");x.setAttribute("id","geFindWinAllPagesChck");x.setAttribute("type","checkbox");x.style.marginRight="4px";t.appendChild(x);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");t.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));t.appendChild(v);var y=document.createElement("div");mxUtils.br(t);v=mxUtils.button(mxResources.get("reset"),
-function(){u.value="";u.style.backgroundColor="";m=n=null;p=!1;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";t.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(z){a.handleError(z)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";t.appendChild(v);
-mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)d.funct();else if(m!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(t,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(d.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),t,e,c,b,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()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?x.removeAttribute("disabled"):(x.checked=!1,x.setAttribute("disabled","disabled"))):g.container.focus()}));this.window.setLocation=function(a,
-d){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));d=Math.max(0,Math.min(d,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments)};var A=mxUtils.bind(this,function(){var a=this.window.getX(),d=this.window.getY();this.window.setLocation(a,d)});mxEvent.addListener(window,
-"resize",A);this.destroy=function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},FreehandWindow=function(a,e,c,b,k){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var l=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop="8px";l.style.marginRight=
-"4px";l.style.width="160px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";a.appendChild(l);var d=l.cloneNode(!1);mxUtils.write(d,mxResources.get("stopDrawing"));d.setAttribute("title",mxResources.get("stopDrawing"));d.style.marginTop="4px";mxEvent.addListener(d,"click",function(){f.freehand.stopDrawing()});a.appendChild(d);this.window=new mxWindow(mxResources.get("freehand"),a,e,c,b,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);f.addListener("freehandStateChanged",mxUtils.bind(this,function(){d.className="geBtn"+(f.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));this.window.setLocation=function(a,d){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
-a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));d=Math.max(0,Math.min(d,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments)};var g=mxUtils.bind(this,function(){var a=this.window.getX(),d=this.window.getY();this.window.setLocation(a,d)});mxEvent.addListener(window,"resize",g);this.destroy=function(){mxEvent.removeListener(window,"resize",g);this.window.destroy()}},
-TagsWindow=function(a,e,c,b,k){var f=a.editor.graph,l="tags",d=document.createElement("div");d.style.userSelect="none";d.style.overflow="hidden";d.style.padding="10px";d.style.height="100%";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("allTags"));g.setAttribute("type","text");g.style.marginTop="4px";g.style.width="260px";g.style.fontSize="12px";g.style.borderRadius="4px";g.style.padding="6px";d.appendChild(g);if(!a.isOffline()||mxClient.IS_CHROMEAPP){g.style.width=
-"240px";var m=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");m.firstChild.style.marginBottom="6px";m.style.marginLeft="6px";d.appendChild(m)}mxEvent.addListener(g,"dblclick",function(){var d=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(d.container,300,80,!0,!0);d.init()});g.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(d);
-m=mxUtils.button(mxResources.get("hide"),function(){var a=f.getCellsForTags(g.value.split(" "),void 0,l,!0);f.setCellsVisible(a,!1)});m.setAttribute("title",mxResources.get("hide"));m.style.marginTop="8px";m.style.marginRight="4px";m.className="geBtn";d.appendChild(m);m=mxUtils.button(mxResources.get("show"),function(){var a=f.getCellsForTags(g.value.split(" "),void 0,l,!0);f.setCellsVisible(a,!0);if(f.isEnabled()){for(var d=[],b=0;b<a.length;b++)(f.model.isVertex(a[b])||f.model.isEdge(a[b]))&&d.push(a[b]);
-f.setSelectionCells(d)}else for(b=0;b<a.length;b++)f.highlightCell(a[b])});m.setAttribute("title",mxResources.get("show"));m.style.marginTop="8px";m.style.marginRight="4px";m.className="geBtn";d.appendChild(m);var n=a.actions.get("tags"),m=mxUtils.button(mxResources.get("close"),function(){n.funct()});m.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");m.style.marginTop="8px";m.className="geBtn gePrimaryBtn";d.appendChild(m);mxEvent.addListener(g,"keyup",function(a){13!=a.keyCode&&27!=
-a.keyCode||n.funct()});this.window=new mxWindow(mxResources.get("tags"),d,e,c,b,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||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)):f.container.focus()}));this.window.setLocation=function(a,
-d){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));d=Math.max(0,Math.min(d,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments)};var p=mxUtils.bind(this,function(){var a=this.window.getX(),d=this.window.getY();this.window.setLocation(a,d)});mxEvent.addListener(window,
-"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},AuthDialog=function(a,e,c,b){var k=document.createElement("div");k.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var l="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight=
-"10px";e==a.drive?(l=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(l=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(l=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==a.gitLab?(l=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==a.trello&&(l=mxResources.get("trello"),
-d.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var g=document.createElement("input");g.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(g.checked)});l.insertBefore(d,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";k.appendChild(f);k.appendChild(a);k.appendChild(l);c&&(c=document.createElement("p"),c.style.marginTop=
-"20px",c.appendChild(g),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),k.appendChild(c),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)}));this.container=k},MoreShapesDialog=function(a,e,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),k=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var l=a.sidebar.customEntries[f],
-d={title:a.getResource(l.title),entries:[]},g=0;g<l.entries.length;g++){var m=l.entries[g];d.entries.push({id:m.id,title:a.getResource(m.title),desc:a.getResource(m.desc),image:m.preview})}k.push(d)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)k.push(c[f]);else{d={title:c[f].title,entries:[]};for(g=0;g<c[f].entries.length;g++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[g].id)&&d.entries.push(c[f].entries[g]);0<d.entries.length&&k.push(d)}c=k;if(e){g=mxUtils.bind(this,
-function(d){for(var b=0;b<d.length;b++)(function(d){var c=q.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,d.title);n.appendChild(c);for(var e=0;e<d.entries.length;e++)(function(d){var c=q.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.setAttribute("title",d.title+" ("+d.id+")");var g=
-document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(d.id);g.defaultChecked=g.checked;c.appendChild(g);mxUtils.write(c," "+d.title);n.appendChild(c);var m=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=d.desc){var b=document.createElement("pre");b.style.boxSizing="border-box";b.style.fontFamily="inherit";b.style.margin="20px";b.style.right="0px";
-b.style.textAlign="left";mxUtils.write(b,d.desc);p.appendChild(b)}null!=d.imageCallback?d.imageCallback(p):null!=d.image?p.innerHTML+='<img border="0" src="'+d.image+'"/>':null==d.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=t&&(t.style.backgroundColor="");t=c;t.style.backgroundColor="dark"==uiTheme?"#000000":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",m);mxEvent.addListener(c,"dblclick",function(a){g.checked=
-!g.checked;mxEvent.consume(a)});u.push(function(){return g.checked?d.id:null});0==b&&0==e&&m()})(d.entries[e])})(d[b])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var n=document.createElement("div"),p=document.createElement("div");n.style.position="absolute";n.style.top=
-"40px";n.style.left="0px";n.style.width="202px";n.style.bottom="60px";n.style.overflow="auto";mxClient.IS_QUIRKS&&(n.style.height="437px",n.style.marginTop="1px");p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";mxClient.IS_QUIRKS&&(p.style.width=parseInt(f.style.width)-202+"px",p.style.height=n.style.height,p.style.marginTop=n.style.marginTop);
-var t=null,u=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";g(c);b.style.padding="30px";b.appendChild(f);b.appendChild(n);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop=
+var BackgroundImageDialog=function(a,d,c){var b=document.createElement("div");b.style.whiteSpace="nowrap";var g=document.createElement("h2");mxUtils.write(g,mxResources.get("backgroundImage"));g.style.marginTop="0px";b.appendChild(g);mxUtils.write(b,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(b);var f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=null!=c?c.src:"";var l=!1,n=!1,
+e=function(e,b){null!=e&&n||(f.value=mxUtils.trim(f.value),l||""==f.value||a.isOffline()?(k.value="",m.value="",null!=b&&b("")):a.loadImage(f.value,function(a){k.value=a.width;m.value=a.height;null!=b&&b(f.value)},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));k.value="";m.value="";null!=b&&b(null)}))};this.init=function(){f.focus();if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=b.parentNode,d=null;
+mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(e){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=a.highlightElement(c));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,
+function(a,b,c,d,k,m){f.value=a;e()},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var e=0;e<a.length;e++)a[e]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&(f.value=decodeURIComponent(c),e())}b.stopPropagation();b.preventDefault()}),!1)}};b.appendChild(f);mxUtils.br(b);mxUtils.br(b);mxUtils.write(b,mxResources.get("width")+
+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="60px";k.style.marginLeft="4px";k.style.marginRight="16px";k.value=null!=c?c.width:"";b.appendChild(k);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";b.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){f.value="";k.value="";m.value=
+"";l=!1});mxEvent.addGestureListeners(c,function(){l=!0});c.className="geBtn";c.width="100";b.appendChild(c);mxUtils.br(b);mxEvent.addListener(f,"change",e);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&&(f.value=a.url,e()));f.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";g=mxUtils.button(mxResources.get("cancel"),function(){l=!0;a.hideDialog()});
+g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(null,function(a){d(""!=a&&null!=a?new mxImage(f.value,k.value,m.value):null,null==a)})});mxEvent.addGestureListeners(applyBtn,function(){n=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);a.editor.cancelFirst||c.appendChild(g);b.appendChild(c);this.container=b},ParseDialog=function(a,d,c){function b(e,b,c){var d=e.split("\n");if("plantUmlPng"==
+b||"plantUmlSvg"==b||"plantUmlTxt"==b){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(e,b,d,k,p){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,k,p));var g=null;m.getModel().beginUpdate();try{g="txt"==b?a.insertAsPreText(d,f.x,f.y):m.insertVertex(null,null,null,f.x,f.y,k,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(d)+";"),m.setAttributeForCell(g,"plantUmlData",JSON.stringify({data:e,format:b},null,
+2))}finally{m.getModel().endUpdate()}null!=g&&(m.setSelectionCell(g),m.scrollCellToVisible(g))},m=a.editor.graph,p="plantUmlTxt"==b?"txt":"plantUmlPng"==b?"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"==p?window.setTimeout(function(){a.spinner.stop();k(e,p,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):a.generatePlantUmlImage(e,p,function(b,c,d){a.spinner.stop();k(e,p,b,c,d)},function(e){a.handleError(e)})}}else if("mermaid"==b)a.spinner.spin(document.body,mxResources.get("inserting"))&&(m=a.editor.graph,a.generateMermaidImage(e,p,function(b,d,k){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(new mxRectangle(0,0,d,k));a.spinner.stop();var p=null;m.getModel().beginUpdate();try{p=m.insertVertex(null,null,null,f.x,f.y,d,k,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+b+";"),m.setAttributeForCell(p,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},function(e){a.handleError(e)}));else if("table"==b){var g=null,q=[],u=0;for(b=0;b<d.length;b++){var l=mxUtils.trim(d[b]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),g=new mxCell(l,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,q.push(g),l=a.editor.graph.getPreferredSizeForCell(n),null!=l&&(g.geometry.width=l.width+10);else if(null!=g&&")"==l.charAt(0))u+=g.geometry.width+40,g=null;else if("("!=l&&null!=g&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var t=l.toLowerCase().indexOf("primary key"),
+l=l.replace(/primary key/i,""),n=new mxCell("",new mxGeometry(0,0,160,30),"shape=partialRectangle;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(0<t?"1":"0")+";");n.vertex=!0;var H=new mxCell(0<t?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(0<t?"fontStyle=1;":""));H.vertex=!0;n.insert(H);l=new mxCell(l,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;"+(0<t?"fontStyle=5;":""));l.vertex=!0;n.insert(l);l=a.editor.graph.getPreferredSizeForCell(l);null!=l&&g.geometry.width<l.width+30&&(g.geometry.width=Math.min(320,Math.max(g.geometry.width,l.width+30)));g.insert(n);g.geometry.height+=30}}0<q.length&&(m=a.editor.graph,f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),m.setSelectionCells(m.importCells(q,
+f.x,f.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==b){if(0<d.length){m=a.editor.graph;n=null;q=[];for(b=g=0;b<d.length;b++)";"!=d[b].charAt(0)&&(0==d[b].length?n=null:null==n?(n=new mxCell(d[b],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;"),n.vertex=!0,q.push(n),l=m.getPreferredSizeForCell(n),null!=l&&n.geometry.width<l.width+10&&(n.geometry.width=
+l.width+10),g+=n.geometry.width+40):"--"==d[b]?(l=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;"),l.vertex=!0,n.geometry.height+=l.geometry.height,n.insert(l)):0<d[b].length&&(u=new mxCell(d[b],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,l=m.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),n.geometry.width=Math.max(n.geometry.width,u.geometry.width),n.geometry.height+=u.geometry.height,n.insert(u)));if(0<q.length){f=mxEvent.isAltDown(c)?f:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,f.x,f.y);l=[];for(b=0;b<q.length;b++)l.push(q[b]),l=l.concat(q[b].children);m.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var n=function(a){var e=J[a];null==e&&(e=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),e.vertex=!0,J[a]=e,q.push(e));return e},J={},q=[];for(b=0;b<d.length;b++)if(";"!=d[b].charAt(0)){var I=d[b].split("->");2<=I.length&&(t=n(I[0]),H=n(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry),I.edge=!0,t.insertEdge(I,!0),H.insertEdge(I,!1),q.push(I))}if(0<q.length){d=document.createElement("div");d.style.visibility="hidden";
+document.body.appendChild(d);m=new Graph(d);m.getModel().beginUpdate();try{q=m.importCells(q);for(b=0;b<q.length;b++)m.getModel().isVertex(q[b])&&(l=m.getPreferredSizeForCell(q[b]),q[b].geometry.width=Math.max(q[b].geometry.width,l.width),q[b].geometry.height=Math.max(q[b].geometry.height,l.height));g=new mxFastOrganicLayout(m);g.disableEdgeStyle=!1;g.forceConstant=120;g.execute(m.getDefaultParent());u=new mxParallelEdgeLayout(m);u.spacing=20;u.execute(m.getDefaultParent())}finally{m.getModel().endUpdate()}m.clearCellOverlays();
+l=[];a.editor.graph.getModel().beginUpdate();try{q=m.getModel().getChildren(m.getDefaultParent()),f=mxEvent.isAltDown(c)?f:a.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),l=a.editor.graph.importCells(q,f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());m.destroy();d.parentNode.removeChild(d)}}}function g(){return"list"==
+n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==n.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":
+"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
+";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height="354px";l.style.marginBottom="16px";var n=document.createElement("select");if("formatSql"==c||"mermaid"==c)n.style.display="none";var e=document.createElement("option");e.setAttribute("value","list");mxUtils.write(e,mxResources.get("list"));"plantUml"!=c&&n.appendChild(e);
+null!=c&&"fromText"!=c||e.setAttribute("selected","selected");e=document.createElement("option");e.setAttribute("value","table");mxUtils.write(e,mxResources.get("formatSql"));"formatSql"==c&&(n.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","mermaid");mxUtils.write(e,mxResources.get("formatSql"));"mermaid"==c&&(n.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","diagram");
+mxUtils.write(e,mxResources.get("diagram"));"plantUml"!=c&&n.appendChild(e);e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==c&&e.setAttribute("selected","selected");var k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var m=document.createElement("option");m.setAttribute("value",
+"plantUmlTxt");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(n.appendChild(e),n.appendChild(k),n.appendChild(m));var p=g();l.value=p;d.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
+a.dataTransfer.files[0];var e=new FileReader;e.onload=function(a){l.value=a.target.result};e.readAsText(a)}},!1));d.appendChild(n);mxEvent.addListener(n,"change",function(){var a=g();if(0==l.value.length||l.value==p)p=a,l.value=p});a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("close"),
+function(){l.value==p?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);k=mxUtils.button(mxResources.get("insert"),function(e){a.hideDialog();b(l.value,n.value,e)});d.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(e);this.container=d},NewDialog=function(a,d,c,b,g,f,l,n,e,k,m,p,q,u,t,v,y){function x(){var a=!0;if(null!=ha)for(;J<ha.length&&(a||0!=mxUtils.mod(J,30));){var e=
+ha[J++],e=z(e.url,e.libs,e.title,e.tooltip?e.tooltip:e.title,e.select,e.imgUrl,e.info,e.onClick,e.preview,e.noImg,e.clibs);a&&e.click();a=!1}}function A(){if(ca)c||a.hideDialog(),u(ca,ea,H.value);else if(b)c||a.hideDialog(),b(U,H.value);else{var e=H.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,U,null!=aa&&0<aa.length?aa:null,null,function(){a.hideDialog()},null,b,null,null!=fa&&0<fa.length?fa:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}
+function B(a,b,c,d,k,m){null!=V&&(V.style.backgroundColor="transparent",V.style.border="1px solid transparent");G.removeAttribute("disabled");U=b;aa=c;fa=m;V=a;ca=d;ea=k;V.style.backgroundColor=n;V.style.border=e}function z(e,b,c,d,k,m,f,p,g,q,l){var u=document.createElement("div");u.className="geTemplate";u.style.height=T+"px";u.style.width=P+"px";"dark"==uiTheme&&(u.style.filter="invert(100%)");null!=c?u.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&u.setAttribute("title",
+d);if(null!=m)u.style.backgroundImage="url("+m+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){B(u,null,null,e,f,l)}),mxEvent.addListener(u,"dblclick",function(a){A()});else if(!q&&null!=e&&0<e.length){d=g||TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png";u.style.backgroundImage="url("+d+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=c&&(u.innerHTML=
+'<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+(T-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var J=!1;mxEvent.addListener(u,"click",function(c){G.setAttribute("disabled",
+"disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";c=e;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;I.spin(O);mxUtils.get(c,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(B(u,a.getText(),b,null,null,l),J&&A())}))});mxEvent.addListener(u,"dblclick",function(a){J=!0})}else u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
+(T-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",k&&B(u),null!=p?mxEvent.addListener(u,"click",p):(mxEvent.addListener(u,"click",function(a){B(u,null,null,e,f)}),mxEvent.addListener(u,"dblclick",function(a){A()}));O.appendChild(u);return u}function C(){ia&&(ia=!1,mxEvent.addListener(O,"scroll",function(a){O.scrollTop+O.clientHeight>=O.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<Z){var e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+mxUtils.write(e,mxResources.get("custom"));W.appendChild(e);for(var b in S){var c=document.createElement("div"),e=b,d=S[b];18<e.length&&(e=e.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",e+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=k&&(c.style.padding=k);W.appendChild(c);(function(e,b){mxEvent.addListener(c,"click",function(){a!=
+b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,O.scrollTop=0,O.innerHTML="",J=0,ha=S[e],N=null,x())})})(b,c)}e=document.createElement("div");e.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(e,"draw.io");W.appendChild(e)}for(b in X)c=document.createElement("div"),e=mxResources.get(b),d=X[b],null==e&&(e=b.substring(0,1).toUpperCase()+b.substring(1)),18<e.length&&(e=e.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
+c.setAttribute("title",e+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=k&&(c.style.padding=k),W.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=l,ha=d),function(e,b){mxEvent.addListener(c,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,O.scrollTop=0,O.innerHTML="",J=0,ha=X[e],N=null,x())})}(b,c);x()}c=null!=c?c:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";n=null!=n?n:"dark"==uiTheme?"#a2a2a2":"#e6eff8";e=null!=e?e:"dark"==uiTheme?
+"1px dashed #00a8ff":"1px solid #ccd9ea";m=null!=m?m:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";c&&D.appendChild(F);var E=document.createElement("img");E.setAttribute("border","0");E.setAttribute("align","absmiddle");E.style.width="40px";E.style.height="40px";E.style.marginRight="10px";E.style.paddingBottom="4px";E.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
+a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&c&&F.appendChild(E);c&&mxUtils.write(F,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
+mxResources.get("filename"))+":");E=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?E=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?E=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?E=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?E=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?E=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(E=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",a.defaultFilename+
+E);H.style.marginLeft="10px";H.style.width=d?"144px":"244px";this.init=function(){c&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};c&&(F.appendChild(H),null!=a.editor.diagramFileTypes&&(E=FilenameDialog.createFileTypes(a,H,a.editor.diagramFileTypes),E.style.marginLeft="6px",E.style.width=d?"80px":"180px",F.appendChild(E)),null!=a.editor.fileExtensions&&(E=FilenameDialog.createTypeHint(a,H,a.editor.fileExtensions),
+E.style.marginTop="12px",F.appendChild(E)));var F=!1,J=0,I=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}),G=mxUtils.button(v||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");A();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";if(p||q){var M=[],N=null,L=null,K=null,R=function(a){G.setAttribute("disabled","disabled");for(var e=0;e<M.length;e++)M[e].className=e==a?"geBtn gePrimaryBtn":
+"geBtn"},F=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);E=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){W.style.display="";O.style.left="160px";R(0);O.scrollTop=0;O.innerHTML="";J=0;N!=ha&&(ha=N,X=L,Z=K,W.innerHTML="",C(),N=null)});M.push(E);v.appendChild(E);var Y=function(a){W.style.display="none";O.style.left="30px";R(a?-1:1);null==N&&(N=ha);O.scrollTop=0;O.innerHTML="";I.spin(O);var e=function(a,e,b){J=0;I.stop();
+ha=a;b=b||{};var c=0,d;for(d in b)c+=b[d].length;if(e)O.innerHTML=e;else if(0==a.length&&0==c)O.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(O.innerHTML="",0<c){W.style.display="";O.style.left="160px";W.innerHTML="";Z=0;X={"draw.io":a};for(d in b)X[d]=b[d];C()}else x()};a?q(da.value,e):p(e)};p&&(E=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),v.appendChild(E),M.push(E));if(q){E=document.createElement("span");E.style.marginLeft=
+"10px";E.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(E);var da=document.createElement("input");da.style.marginRight="10px";da.style.marginLeft="10px";da.style.width="220px";mxEvent.addListener(da,"keypress",function(a){13==a.keyCode&&Y(!0)});v.appendChild(da);E=mxUtils.button(mxResources.get("search"),function(){Y(!0)});E.className="geBtn";v.appendChild(E)}R(0)}var aa=null,fa=null,U=null,V=null,ca=null,ea=null,O=document.createElement("div");O.style.border="1px solid #d3d3d3";
+O.style.position="absolute";O.style.left="160px";O.style.right="34px";v=(c?72:40)+(F?30:0);O.style.top=v+"px";O.style.bottom="68px";O.style.margin="6px 0 0 -1px";O.style.padding="6px";O.style.overflow="auto";var W=document.createElement("div");W.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var T=140,P=140,X={},S={},Z=0,ia=!0;X.basic=[{title:"blankDiagram",select:!0}];var ha=X.basic;if(!d){var Q=function(){mxUtils.get(ba,
+function(a){if(!ka){ka=!0;a=a.getXml().documentElement.firstChild;for(var e={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var b=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],k=0;k<c.length;k++)d.push(encodeURIComponent(mxUtils.getTextContent(c[k])));null!=b&&0<d.length&&(e[b]=d.join(";"))}else b=a.getAttribute("url"),null!=b&&(c=a.getAttribute("section"),null==c&&(c=b.indexOf("/"),c=b.substring(0,c)),b=X[c],null==b&&(b=[],X[c]=b),c=a.getAttribute("clibs"),
+null!=e[c]&&(c=e[c]),b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();C()}})};D.appendChild(W);D.appendChild(O);var ka=!1,ba=m;/^https?:\/\//.test(ba)&&!a.editor.isCorsEnabledForUrl(ba)&&(ba=PROXY_URL+"?url="+encodeURIComponent(ba));I.spin(O);null!=y?y(function(a,e){S=a;K=Z=e;Q()},Q):Q();L=X}mxEvent.addListener(H,"keypress",function(e){a.dialog.container.firstChild==
+D&&13==e.keyCode&&A()});m=document.createElement("div");m.style.marginTop=d?"4px":"16px";m.style.textAlign="right";m.style.position="absolute";m.style.left="40px";m.style.bottom="24px";m.style.right="40px";d||a.isOffline()||!c||null!=b||g||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",m.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});y.className=
+"geBtn";!a.editor.cancelFirst||g&&null==f||m.appendChild(y);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var e=new FilenameDialog(a,"",mxResources.get("create"),function(e){null!=e&&0<e.length&&(e=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(e)),null==a.getCurrentFile()?window.location.href=e:window.openWindow(e))},mxResources.get("url"));a.showDialog(e.container,300,80,!0,!0);e.init()}),
+d.className="geBtn",m.appendChild(d));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var e=document.createElement("input");e.setAttribute("multiple","multiple");e.setAttribute("type","file");mxEvent.addListener(e,"change",function(b){a.openFiles(e.files,!0);e.value=""});e.style.display="none";document.body.appendChild(e);a.newDlgFileInputElt=e}a.newDlgFileInputElt.click()}),t.className="geBtn",m.appendChild(t));m.appendChild(G);a.editor.cancelFirst||
+null!=b||g&&null==f||m.appendChild(y);D.appendChild(m);this.container=D},CreateDialog=function(a,d,c,b,g,f,l,n,e,k,m,p,q,u,t,v,y){function x(e,b,c,k){function m(){mxEvent.addListener(f,"click",function(){var e=c;if(l){var b=z.value,k=b.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>k){var e=null!=e?e:F.value,m="";e==App.MODE_GOOGLE?m=a.drive.extension:e==App.MODE_GITHUB?m=a.gitHub.extension:e==App.MODE_GITLAB?m=a.gitLab.extension:e==App.MODE_TRELLO?m=a.trello.extension:e==App.MODE_DROPBOX?m=a.dropbox.extension:
+e==App.MODE_ONEDRIVE?m=a.oneDrive.extension:e==App.MODE_DEVICE&&(m=".drawio");0<=k&&(b=b.substring(0,k));z.value=b+m}}A(c)})}var f=document.createElement("a");f.style.overflow="hidden";var g=document.createElement("img");g.src=e;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding=
+"8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(g);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var q=document.createElement("div");f.appendChild(q);mxUtils.write(q,b);if(null!=k&&null==a[k]){g.style.visibility="hidden";mxUtils.setOpacity(q,10);var u=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});u.spin(f);var J=window.setTimeout(function(){null==
+a[k]&&(u.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(J),mxUtils.setOpacity(q,100),g.style.visibility="",u.stop(),m())}))}else m();C.appendChild(f);++D==p&&(mxUtils.br(C),D=0)}function A(e){var b=z.value;if(null==e||null!=b&&0<b.length)y&&a.hideDialog(),c(b,e,z)}l=null!=l?l:!0;n=null!=n?n:!0;p=null!=p?p:4;y=null!=y?y:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var B=
+document.createElement("h2");mxUtils.write(B,g||mxResources.get("create"));B.style.marginTop="0px";B.style.marginBottom="24px";f.appendChild(B);mxUtils.write(f,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",d);z.style.width="200px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",
+!1,null)};f.appendChild(z);null!=v&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,z,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",f.appendChild(g)),f.appendChild(FilenameDialog.createTypeHint(a,z,v)));null==q||null==u||"image/"!=u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(z.style.width="160px",v=document.createElement("img"),q=t?q:btoa(unescape(encodeURIComponent(q))),v.setAttribute("src","data:"+u+";base64,"+q),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%)"),f.appendChild(v),e&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){A("_blank")})));mxUtils.br(f);var C=document.createElement("div");C.style.textAlign="center";var D=0;C.style.marginTop="6px";f.appendChild(C);var F=document.createElement("select");F.style.marginLeft="10px";a.isOfflineApp()||
+a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),F.appendChild(u),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),F.appendChild(u),a.mode==App.MODE_ONEDRIVE&&
+u.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u,mxResources.get("dropbox")),F.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),
+u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),F.appendChild(u),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),F.appendChild(u),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",
+App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),F.appendChild(u),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),F.appendChild(u),a.mode!=App.MODE_DEVICE&&n||u.setAttribute("selected","selected"),m&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),
+App.MODE_DEVICE));n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),F.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="center";null!=k&&(m=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),
+m.className="geBtn",n.appendChild(m));m=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});m.className="geBtn";a.editor.cancelFirst&&n.appendChild(m);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),u.className="geBtn",n.appendChild(u));e&&Editor.popupsAllowed&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),e.className="geBtn",n.appendChild(e));
+CreateDialog.showDownloadButton&&(e=mxUtils.button(mxResources.get("download"),function(){A("download")}),e.className="geBtn",n.appendChild(e));a.editor.cancelFirst||n.appendChild(m);mxEvent.addListener(z,"keypress",function(e){13==e.keyCode?A(App.MODE_DEVICE):27==e.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(n);this.container=f};CreateDialog.showDownloadButton=!0;
+var PopupDialog=function(a,d,c,b,g){g=null!=g?g:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";f.appendChild(l);mxUtils.br(f);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=c&&c();a.openLink(d,
+null,!0)});n.className="geBtn gePrimaryBtn";n.style.width=l.style.width;f.appendChild(n);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,d,c,b,g,f){f=null!=f?f:!0;var l=a.editor.graph,n=document.createElement("div");mxUtils.write(n,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";mxClient.IS_VML||(d.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("value",c);e.setAttribute("type","text");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.marginTop="6px";e.style.width=(Graph.fileSupport?460:340)+(mxClient.IS_QUIRKS?20:-20)+"px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";
+e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){e.value="";e.focus()});d.appendChild(e);d.appendChild(c);
+n.appendChild(d);var k=function(e,c,d,k){var m="data:"==e.substring(0,5);!a.isOffline()||m&&"undefined"===typeof chrome?0<e.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(e,function(m){a.spinner.stop();a.hideDialog();var p=!1===k?1:null!=c&&null!=d?Math.max(c/m.width,d/m.height):Math.min(1,Math.min(520/m.width,520/m.height));f&&(e=a.convertDataUri(e));b(e,Math.round(Number(m.width)*p),Math.round(Number(m.height)*p))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),
+mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(e)):(e=a.convertDataUri(e),c=null==c?120:c,d=null==d?100:d,a.hideDialog(),b(e,c,d))},m=function(e,c){if(null!=e){var d=g?null:l.getModel().getGeometry(l.getSelectionCell());null!=d?k(e,d.width,d.height,c):k(e,null,null,c)}else a.hideDialog(),b(null)};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=null;mxEvent.addListener(b,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(e){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<e.dataTransfer.files.length)a.importFiles(e.dataTransfer.files,0,0,a.maxImageSize,function(a,e,b,c,d,k,f,p){m(a,
+p)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var e=0;e<a.length;e++)a[e]()},!mxEvent.isControlDown(e),null,null,!0);else if(0<=mxUtils.indexOf(e.dataTransfer.types,"text/uri-list")){var b=e.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(b)&&m(decodeURIComponent(b))}e.stopPropagation();e.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";c.style.textAlign="center";d=mxUtils.button(mxResources.get("cancel"),
+function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);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&&(e.value=a.url));e.focus()};if(Graph.fileSupport){if(null==a.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type","file");mxEvent.addListener(p,"change",function(e){null!=
+p.files&&(a.importFiles(p.files,0,0,a.maxImageSize,function(a,e,b,c,d,k){m(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var e=0;e<a.length;e++)a[e]()},!0),p.type="",p.type="file",p.value="")});p.style.display="none";document.body.appendChild(p);a.imgDlgFileInputElt=p}var q=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});q.className="geBtn";c.appendChild(q)}document.createElement("canvas").getContext&&"data:image/"==e.value.substring(0,
+11)&&"data:image/svg"!=e.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,e.value,function(a){e.value=a});a.showDialog(b.container,300,380,!0,!0);b.init()}),q.className="geBtn",c.appendChild(q));mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&m(e.value)});q=mxUtils.button(mxResources.get("apply"),function(){m(e.value)});q.className="geBtn gePrimaryBtn";c.appendChild(q);a.editor.cancelFirst||c.appendChild(d);Graph.fileSupport&&(c.style.marginTop=
+"120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition="center 65%",n.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")),n.appendChild(d));n.appendChild(c);this.container=n},LinkDialog=function(a,d,c,b,g){function f(a,e,b){b=mxUtils.button("",b);b.className=
+"geBtn";b.setAttribute("title",e);e=document.createElement("img");e.style.height="26px";e.style.width="26px";e.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(e);y.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor=
+"default";mxClient.IS_VML||(n.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="100%";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";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=mxClient.IS_VML?"inline":"inline-block";k.style.top=(mxClient.IS_VML?0:3)+"px";k.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(k,"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",
+"current-linkdialog");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","current-linkdialog");var q=document.createElement("select");q.style.width="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(e.setAttribute("value",d),m.setAttribute("checked","checked"),m.defaultChecked=!0);n.appendChild(m);
+n.appendChild(e);n.appendChild(k);mxUtils.br(n);n.appendChild(p);g=!1;for(k=0;k<a.pages.length;k++){var u=document.createElement("option");mxUtils.write(u,a.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));u.setAttribute("value","data:page/id,"+a.pages[k].getId());d==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);q.appendChild(u)}if(!g&&p.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");
+t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");q.appendChild(t);mxEvent.addListener(q,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}n.appendChild(q)}else e.setAttribute("value",d),n.appendChild(e),n.appendChild(k);l.appendChild(n);var v=mxUtils.button(c,function(){a.hideDialog();b(p.checked?"pageNotFound"!==q.value?q.value:d:e.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
+function(){p.checked?q.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?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 b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
+c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),m.setAttribute("checked",
+"checked"),m.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";y.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&y.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+
+a.docs[0].id);e.value=b;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
+b=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),e=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(e).addView(b).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED);a.linkPicker=e.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.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(a){e.value=a[0].link;e.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){e.value=b.value[0].webUrl;e.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=
+a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");e.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;e.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+b+"/"+c+"/blob/"+d+"/"+a;e.focus()}})});mxEvent.addListener(e,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(p.checked?
+q.value:e.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(c);l.appendChild(y);this.container=l},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);
+var l=document.createElement("input");l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="600px";var n=mxUtils.button(mxResources.get("sendMessage"),function(){var e=m.value+(k.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;e.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),
+a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(l.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+e),function(e){a.spinner.stop();200<=e.getStatus()&&299>=e.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});
+n.className="geBtn gePrimaryBtn";if(!c){n.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(l,"change",function(){0<l.value.length&&0<e.test(l.value)?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")});mxEvent.addListener(l,"keyup",function(){0<l.value.length&&e.test(l.value)?n.removeAttribute("disabled"):n.setAttribute("disabled",
+"disabled")})}g.appendChild(l);this.init=function(){l.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;c=document.createElement("p");c.style.marginTop="14px";c.appendChild(k);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("includeCopyOfMyDiagram"));c.appendChild(f);mxEvent.addListener(f,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});g.appendChild(c);f=document.createElement("div");
+mxUtils.write(f,mxResources.get("feedback"));g.appendChild(f);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("comments"));g.appendChild(m);c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),
+c.appendChild(f));g.appendChild(c);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(a,d,c){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
+"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var n=new Graph(l);n.setTooltips(!1);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var e=0,k=null,m=0,p=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=k&&null!=k[m]?k[m].getAttribute("name"):"pagenumber"==a?m+1:"pagecount"==a?null!=k?k.length:1:p.apply(this,arguments)};n.getLinkForCell=
+function(){return null};Editor.MathJaxRender&&n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(e,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,v=null,y=null,x=null,A=mxUtils.button("",function(){null!=y&&n.zoomIn()});A.className="geSprite geSprite-zoomin";
+A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=y&&n.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var z=mxUtils.button("",function(){null!=y&&
+(n.maxFitScale=8,n.fit(8),n.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var C=mxUtils.button("",function(){null!=y&&(n.zoomActual(),n.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled",
+"disabled");mxUtils.setOpacity(C,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var F=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var e=mxUtils.getXml(y.documentElement),b=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(e,b,"text/xml"):(e=
+"undefined"===typeof pako?"&xml="+encodeURIComponent(e):"&data="+encodeURIComponent(Graph.compress(e)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+e)).simulate(document,"_blank"))}});F.className="geBtn";F.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(x):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(e){a.spinner.stop();
+a.replaceFileData(x);a.hideDialog()},function(e){a.spinner.stop();a.editor.setStatus("");a.handleError(e,null!=e?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,"change",function(a){null!=
+J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var G=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(H.selectedIndex))});G.className="geBtn gePrimaryBtn";G.setAttribute("disabled",
+"disabled");null!=c&&(G.style.display="none",E.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var M=document.createElement("div");M.className="geToolbarContainer";M.style.backgroundColor="transparent";M.style.padding="2px";M.style.border="none";M.style.left="199px";M.style.top="442px";var N=null;if(null!=d&&0<d.length){l.style.cursor="move";var L=document.createElement("table");L.style.border=
+"1px solid lightGray";L.style.borderCollapse="collapse";L.style.borderSpacing="0px";L.style.width="100%";var K=document.createElement("tbody"),R=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(e=mxUtils.indexOf(a.pages,a.currentPage));for(var Y=d.length-1;0<=Y;Y--){var da=function(b){var c=new Date(b.modifiedDate),f=null;if(0<=c.getTime()){var p=function(d){q.stop();var p=mxUtils.parseXml(d),g=a.editor.extractGraphModel(p.documentElement,!0);if(null!=g){var v=function(a){null!=a&&(a=
+t(Editor.parseDiagramNode(a)));return a},t=function(a){var e=a.getAttribute("background");if(null==e||""==e||e==mxConstants.NONE)e="#ffffff";l.style.backgroundColor=e;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};H.style.display="none";H.innerHTML="";y=p;x=d;k=parseSelectFunction=null;m=0;if("mxfile"==g.nodeName){p=g.getElementsByTagName("diagram");k=[];for(d=0;d<p.length;d++)k.push(p[d]);m=Math.min(e,k.length-1);0<k.length&&v(k[m]);if(1<k.length)for(H.removeAttribute("disabled"),
+H.style.display="",d=0;d<k.length;d++)p=document.createElement("option"),mxUtils.write(p,k[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),p.setAttribute("value",d),d==m&&p.setAttribute("selected","selected"),H.appendChild(p);J=function(){try{var b=parseInt(H.value);m=e=b;v(k[b])}catch(S){H.value=e,a.handleError(S)}}}else t(g);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());
+D.setAttribute("title",f.getAttribute("title"));A.removeAttribute("disabled");B.removeAttribute("disabled");z.removeAttribute("disabled");C.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),F.removeAttribute("disabled"),G.removeAttribute("disabled"),I.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(C,60)}else H.style.display="none",H.innerHTML="",D.innerHTML="",
+mxUtils.write(D,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===R?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+" "+c.toLocaleTimeString());f.appendChild(g);f.setAttribute("title",c.toLocaleDateString()+
+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(a){v!=b&&(q.stop(),null!=t&&(t.style.backgroundColor=""),v=b,t=f,t.style.backgroundColor="#ebf2f9",x=y=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),l.style.backgroundColor="#ffffff",n.getModel().clear(),E.setAttribute("disabled","disabled"),F.setAttribute("disabled",
+"disabled"),A.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(C,20),q.spin(l),b.getXml(function(a){if(v==b)try{p(a)}catch(W){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+W.message)}},
+function(a){q.stop();H.style.display="none";H.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(f,"dblclick",function(a){G.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);K.appendChild(f)}return f}(d[Y]);null!=da&&Y==d.length-1&&(N=da)}L.appendChild(K);f.appendChild(L)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==
+a.dropbox&&u.constructor==window.DropboxFile?(l.style.display="none",M.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(l.style.display="none",M.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";M.appendChild(H);M.appendChild(A);M.appendChild(B);M.appendChild(C);M.appendChild(z);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(F),
+g.appendChild(I),g.appendChild(E),g.appendChild(G)):(g.appendChild(F),g.appendChild(I),g.appendChild(E),g.appendChild(G),g.appendChild(f));b.appendChild(g);b.appendChild(M);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,l,n,e){var k=document.createElement("div"),m=document.createElement("div");m.style.marginTop="0px";m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.lineHeight="normal";mxUtils.write(m,d);k.appendChild(m);var p=document.createElement("select"),q=mxUtils.bind(this,
+function(){A=mxUtils.parseXml(e[p.value].data);B=a.editor.extractGraphModel(A.documentElement,!0);z=0;this.init()});if(null!=e){p.style.marginLeft="4px";for(d=0;d<e.length;d++){var u=document.createElement("option");u.setAttribute("value",d);var t=new Date(e[d].created),v=new Date(e[d].modified);mxUtils.write(u,t.toLocaleDateString()+" "+t.toLocaleTimeString()+" - "+(t.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());p.appendChild(u)}m.appendChild(p);mxEvent.addListener(p,
+"change",q)}null==c&&(c=e[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);k.appendChild(y);var x=new Graph(y);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=
+mxUtils.parseXml(c),B=a.editor.extractGraphModel(A.documentElement,!0),z=0,C=null,D=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=C&&null!=C[z]?C[z].getAttribute("name"):"pagenumber"==a?z+1:"pagecount"==a?null!=C?C.length:1:D.apply(this,arguments)};x.getLinkForCell=function(){return null};c=mxUtils.button("",function(){x.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));c.style.outline="none";c.style.border="none";c.style.margin=
+"2px";mxUtils.setOpacity(c,60);m=mxUtils.button("",function(){x.zoomOut()});m.className="geSprite geSprite-zoomout";m.setAttribute("title",mxResources.get("zoomOut"));m.style.outline="none";m.style.border="none";m.style.margin="2px";mxUtils.setOpacity(m,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);
+u=mxUtils.button("",function(){x.zoomActual();x.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);l=mxUtils.button(l||mxResources.get("discard"),function(){g.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,
+q()):a.hideDialog(!0))})])});l.className="geBtn";var F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[p.value])});f.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.right="40px";t.style.textAlign="right";v=document.createElement("div");
+v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var e=a.getAttribute("background");if(null==e||""==e||e==mxConstants.NONE)e="dark"==uiTheme?"transparent":"#ffffff";y.style.backgroundColor=e;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return a}function e(e){null!=e&&(e=a(Editor.parseDiagramNode(e)));
+return e}mxEvent.addListener(F,"change",function(a){z=parseInt(F.value);e(C[z]);mxEvent.consume(a)});if("mxfile"==B.nodeName){var b=B.getElementsByTagName("diagram");C=[];for(var c=0;c<b.length;c++)C.push(b[c]);0<C.length&&e(C[z]);F.innerHTML="";if(1<C.length)for(F.style.display="",c=0;c<C.length;c++)b=document.createElement("option"),mxUtils.write(b,C[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),b.setAttribute("value",c),c==z&&b.setAttribute("selected","selected"),F.appendChild(b);
+else F.style.display="none"}else a(B)};v.appendChild(F);v.appendChild(c);v.appendChild(m);v.appendChild(u);v.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(t.appendChild(c),null!=n&&t.appendChild(n),t.appendChild(l),t.appendChild(f)):(t.appendChild(f),t.appendChild(l),null!=n&&t.appendChild(n),t.appendChild(c));k.appendChild(t);
+k.appendChild(v);this.container=k},FindWindow=function(a,d,c,b,g){function f(a,e,b){if("object"===typeof e.value&&null!=e.value.attributes){e=e.value.attributes;for(var c=0;c<e.length;c++)if("label"!=e[c].nodeName){var d=mxUtils.trim(e[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,b.length)===b||null!=a&&a.test(d))return!0}}return!1}function l(b){var c=e.model.getDescendants(e.model.getRoot()),d=u.value.toLowerCase(),g=t.checked?new RegExp(d):null,
+q=null;k!=d&&(k=d,m=null,p=!1);var v=null==m;if(0<d.length){if(p){p=!1;for(var n,J=0;J<a.pages.length;J++)if(a.currentPage==a.pages[J]){n=J;break}b=(n+1)%a.pages.length;m=null;do p=!1,c=a.pages[b],e=a.createTemporaryGraph(e.getStylesheet()),a.updatePageRoot(c),e.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!l(!0)&&b!=n);m&&(m=null,a.selectPage(c));p=!1;e=a.editor.graph;return l(!0)}for(J=0;J<c.length;J++){n=e.view.getState(c[J]);if(null!=n&&null!=n.cell.value&&(v||null==q)&&(e.model.isVertex(n.cell)||
+e.model.isEdge(n.cell))&&(e.isHtmlLabel(n.cell)?(x.innerHTML=e.sanitizeHtml(e.getLabel(n.cell)),label=mxUtils.extractTextWithWhitespace([x])):label=e.getLabel(n.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==g&&(label.substring(0,d.length)===d||f(g,n.cell,d))||null!=g&&(g.test(label)||f(g,n.cell,d))))if(v){q=n;break}else null==q&&(q=n);v=v||n==m}}if(null!=q){if(J==c.length&&y.checked)return m=null,p=!0,l(!0);m=q;e.scrollCellToVisible(m.cell);e.isEnabled()?
+e.setSelectionCell(m.cell):e.highlightCell(m.cell)}else{if(!b&&y.checked)return p=!0,l(!0);e.isEnabled()&&e.clearSelection()}return 0==d.length||null!=q}var n=a.actions.get("find"),e=a.editor.graph,k=null,m=null,p=!1,q=document.createElement("div");q.style.userSelect="none";q.style.overflow="hidden";q.style.padding="10px";q.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom=
+"6px";u.style.width="200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";q.appendChild(u);mxUtils.br(q);var t=document.createElement("input");t.setAttribute("id","geFindWinRegExChck");t.setAttribute("type","checkbox");t.style.marginRight="4px";q.appendChild(t);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");q.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));q.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");
+v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";q.appendChild(v);mxUtils.br(q);var y=document.createElement("input");y.setAttribute("id","geFindWinAllPagesChck");y.setAttribute("type","checkbox");y.style.marginRight="4px";q.appendChild(y);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");q.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));q.appendChild(v);var x=document.createElement("div");mxUtils.br(q);v=mxUtils.button(mxResources.get("reset"),
+function(){u.value="";u.style.backgroundColor="";k=m=null;p=!1;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";q.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(B){a.handleError(B)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";q.appendChild(v);
+mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||93==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(k!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=l()?"":"#ffcfcf"}catch(z){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(q,"keydown",function(e){70==e.keyCode&&a.keyHandler.isControlDown(e)&&!mxEvent.isShiftDown(e)&&(n.funct(),mxEvent.consume(e))});this.window=new mxWindow(mxResources.get("find"),q,d,c,b,g,!0,!0);this.window.destroyOnClose=
+!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?y.removeAttribute("disabled"):(y.checked=!1,y.setAttribute("disabled","disabled"))):e.container.focus()}));this.window.setLocation=function(a,
+e){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));e=Math.max(0,Math.min(e,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==e||mxWindow.prototype.setLocation.apply(this,arguments)};var A=mxUtils.bind(this,function(){var a=this.window.getX(),e=this.window.getY();this.window.setLocation(a,e)});mxEvent.addListener(window,
+"resize",A);this.destroy=function(){mxEvent.removeListener(window,"resize",A);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var l=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop="8px";l.style.marginRight=
+"4px";l.style.width="160px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";a.appendChild(l);var n=l.cloneNode(!1);mxUtils.write(n,mxResources.get("stopDrawing"));n.setAttribute("title",mxResources.get("stopDrawing"));n.style.marginTop="4px";mxEvent.addListener(n,"click",function(){f.freehand.stopDrawing()});a.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),a,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!1);this.window.setClosable(!0);f.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.className="geBtn"+(f.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));this.window.setLocation=function(a,e){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;
+a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));e=Math.max(0,Math.min(e,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==e||mxWindow.prototype.setLocation.apply(this,arguments)};var e=mxUtils.bind(this,function(){var a=this.window.getX(),e=this.window.getY();this.window.setLocation(a,e)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},
+TagsWindow=function(a,d,c,b,g){var f=a.editor.graph,l="tags",n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("allTags"));e.setAttribute("type","text");e.style.marginTop="4px";e.style.width="260px";e.style.fontSize="12px";e.style.borderRadius="4px";e.style.padding="6px";n.appendChild(e);if(!a.isOffline()||mxClient.IS_CHROMEAPP){e.style.width=
+"240px";var k=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");k.firstChild.style.marginBottom="6px";k.style.marginLeft="6px";n.appendChild(k)}mxEvent.addListener(e,"dblclick",function(){var e=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));a.showDialog(e.container,300,80,!0,!0);e.init()});e.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);
+k=mxUtils.button(mxResources.get("hide"),function(){var a=f.getCellsForTags(e.value.split(" "),void 0,l,!0);f.setCellsVisible(a,!1)});k.setAttribute("title",mxResources.get("hide"));k.style.marginTop="8px";k.style.marginRight="4px";k.className="geBtn";n.appendChild(k);k=mxUtils.button(mxResources.get("show"),function(){var a=f.getCellsForTags(e.value.split(" "),void 0,l,!0);f.setCellsVisible(a,!0);if(f.isEnabled()){for(var b=[],c=0;c<a.length;c++)(f.model.isVertex(a[c])||f.model.isEdge(a[c]))&&b.push(a[c]);
+f.setSelectionCells(b)}else for(c=0;c<a.length;c++)f.highlightCell(a[c])});k.setAttribute("title",mxResources.get("show"));k.style.marginTop="8px";k.style.marginRight="4px";k.className="geBtn";n.appendChild(k);var m=a.actions.get("tags"),k=mxUtils.button(mxResources.get("close"),function(){m.funct()});k.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");k.style.marginTop="8px";k.className="geBtn gePrimaryBtn";n.appendChild(k);mxEvent.addListener(e,"keyup",function(a){13!=a.keyCode&&27!=
+a.keyCode||m.funct()});this.window=new mxWindow(mxResources.get("tags"),n,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)):f.container.focus()}));this.window.setLocation=function(a,
+e){var b=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));e=Math.max(0,Math.min(e,b-this.table.clientHeight-48));this.getX()==a&&this.getY()==e||mxWindow.prototype.setLocation.apply(this,arguments)};var p=mxUtils.bind(this,function(){var a=this.window.getX(),e=this.window.getY();this.window.setLocation(a,e)});mxEvent.addListener(window,
+"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},AuthDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("authorizationRequired"));var l="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight=
+"10px";d==a.drive?(l=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(l=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(l=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(l=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(l=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg",n.style.width="32px"):d==a.trello&&(l=mxResources.get("trello"),
+n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var e=document.createElement("input");e.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(e.checked)});l.insertBefore(n,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(l);c&&(c=document.createElement("p"),c.style.marginTop=
+"20px",c.appendChild(e),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),g.appendChild(c),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var l=a.sidebar.customEntries[f],
+n={title:a.getResource(l.title),entries:[]},e=0;e<l.entries.length;e++){var k=l.entries[e];n.entries.push({id:k.id,title:a.getResource(k.title),desc:a.getResource(k.desc),image:k.preview})}g.push(n)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)g.push(c[f]);else{n={title:c[f].title,entries:[]};for(e=0;e<c[f].entries.length;e++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[e].id)&&n.entries.push(c[f].entries[e]);0<n.entries.length&&g.push(n)}c=g;if(d){e=mxUtils.bind(this,
+function(e){for(var b=0;b<e.length;b++)(function(e){var c=t.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,e.title);m.appendChild(c);for(var d=0;d<e.entries.length;d++)(function(e){var c=t.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.setAttribute("title",e.title+" ("+e.id+")");var k=
+document.createElement("input");k.setAttribute("type","checkbox");k.checked=a.sidebar.isEntryVisible(e.id);k.defaultChecked=k.checked;c.appendChild(k);mxUtils.write(c," "+e.title);m.appendChild(c);var f=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=e.desc){var b=document.createElement("pre");b.style.boxSizing="border-box";b.style.fontFamily="inherit";b.style.margin="20px";b.style.right="0px";
+b.style.textAlign="left";mxUtils.write(b,e.desc);p.appendChild(b)}null!=e.imageCallback?e.imageCallback(p):null!=e.image?p.innerHTML+='<img border="0" src="'+e.image+'"/>':null==e.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=c;q.style.backgroundColor="dark"==uiTheme?"#000000":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(c,"click",f);mxEvent.addListener(c,"dblclick",function(a){k.checked=
+!k.checked;mxEvent.consume(a)});u.push(function(){return k.checked?e.id:null});0==b&&0==d&&f()})(e.entries[d])})(e[b])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var m=document.createElement("div"),p=document.createElement("div");m.style.position="absolute";m.style.top=
+"40px";m.style.left="0px";m.style.width="202px";m.style.bottom="60px";m.style.overflow="auto";mxClient.IS_QUIRKS&&(m.style.height="437px",m.style.marginTop="1px");p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";mxClient.IS_QUIRKS&&(p.style.width=parseInt(f.style.width)-202+"px",p.style.height=m.style.height,p.style.marginTop=m.style.marginTop);
+var q=null,u=[],t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";e(c);b.style.padding="30px";b.appendChild(f);b.appendChild(m);b.appendChild(p);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop=
"12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),
-function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var d=[],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(d.join(";"),v.checked,!0)});g.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";g=document.createElement("tr");x.style.width="100%";e=document.createElement("td");var k=document.createElement("td"),
-l=document.createElement("td"),y=mxUtils.bind(this,function(d,b,c){var e=document.createElement("input");e.type="checkbox";x.appendChild(e);e.checked=a.sidebar.isEntryVisible(c);var g=document.createElement("span");mxUtils.write(g,b);b=document.createElement("div");b.style.display="block";b.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"click",function(a){e.checked=!e.checked;mxEvent.consume(a)});d.appendChild(b);return function(){return e.checked?c:null}});g.appendChild(e);g.appendChild(k);
-g.appendChild(l);f.appendChild(g);x.appendChild(f);for(var u=[],A=0,f=0;f<c.length;f++)for(g=0;g<c[f].entries.length;g++)A++;for(var z=[e,k,l],B=0,f=0;f<c.length;f++)(function(a){for(var d=0;d<a.entries.length;d++){var b=a.entries[d];u.push(y(z[Math.floor(B/(A/3))],b.title,b.id));B++}})(c[f]);b.appendChild(x);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=
-!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(0<d.length?
-d.join(";"):"",v.checked);a.hideDialog()});g.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(g)):(c.appendChild(g),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a,e,c){function b(){if(0==l.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var d=0;d<l.length;d++){var e=document.createElement("span");e.style.whiteSpace=
-"nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";e.appendChild(g);mxUtils.write(e,l[d]);f.appendChild(e);mxUtils.br(f);mxEvent.addListener(g,"click",function(d){return function(){a.confirm(mxResources.get("delete")+' "'+l[d]+'"?',function(){null!=c&&c(l[d]);l.splice(d,1);b()})}}(d))}}}var k=document.createElement("div"),f=document.createElement("div");
-f.style.height="120px";f.style.overflow="auto";var l=mxSettings.getPlugins().slice();k.appendChild(f);b();var d=mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(a){a&&0>mxUtils.indexOf(l,a)&&l.push(a);b()})}:function(){var d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("builtinPlugins")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="150px";for(c=0;c<App.publicPlugin.length;c++){var g=
-document.createElement("option");mxUtils.write(g,App.publicPlugin[c]);g.value=App.publicPlugin[c];e.appendChild(g)}d.appendChild(e);mxUtils.br(d);mxUtils.br(d);c=mxUtils.button(mxResources.get("custom")+"...",function(){var d=new FilenameDialog(a,"",mxResources.get("add"),function(d){a.hideDialog();if(null!=d&&0<d.length){d=d.split(";");for(var c=0;c<d.length;c++){var e=d[c],g=App.pluginRegistry[e];null!=g&&(e=g);0<e.length&&0>mxUtils.indexOf(l,e)&&l.push(e)}b()}},mxResources.get("enterValue")+" ("+
-mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});c.className="geBtn";d=new CustomDialog(a,d,mxUtils.bind(this,function(){var a=App.pluginRegistry[e.value];0>mxUtils.indexOf(l,a)&&(l.push(a),b())}),null,null,null,c);a.showDialog(d.container,300,80,!0,!0)});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(l);mxSettings.save();a.hideDialog();
-a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(g),n.appendChild(d),n.appendChild(m)):(n.appendChild(d),n.appendChild(m),
-n.appendChild(g));k.appendChild(n);this.container=k},CropImageDialog=function(a,e,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:e})}var k=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height=
-"300px";k.appendChild(f);var l=null;this.init=function(){b()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,t,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");
-t=document.createElement("i");m.appendChild(p);n.appendChild(t);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),
-function(){l.result({type:"base64",size:"original"}).then(function(d){c(d);a.hideDialog()})});g.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(d),m.appendChild(g)):(m.appendChild(g),m.appendChild(d));k.appendChild(m);this.container=k},EditGeometryDialog=function(a,e){var c=a.editor.graph,b=1==e.length?c.getCellGeometry(e[0]):null,k=document.createElement("div"),f=document.createElement("table"),
-l=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),m=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};m.appendChild(n);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
-m=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.y:
-"";m.appendChild(t);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(u);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");
-mxUtils.write(g,mxResources.get("dy")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";
-m.appendChild(v);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";m.appendChild(x);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,
-mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();
-try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(t.value).length&&(b.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=
-Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),
-f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var I=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow=
-"ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};u.style.backgroundImage="";q.style.display="none";var G=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}G>K?(K=Math.round(100*K/G),G=100):(G=Math.round(100*G/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=G+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-G)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&
-(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var D=document.createElement("img");D.setAttribute("src",Editor.closeImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(a){mxEvent.consume(a)});
-(function(a,d,b){mxEvent.addListener(D,"click",function(c){v[d]=null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position=
-"absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});I();y.appendChild(J);mxEvent.addListener(J,"mousedown",
-function(a){"true"!=J.getAttribute("contentEditable")&&mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,I())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML=
-"";J.style.textOverflow="";J.style.whiteSpace="";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;I()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=
-p&&(D.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);D.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==D.style.visibility&&(D.style.visibility="",J.style.visibility="");x=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,
-"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var H=G.documentElement.getElementsByTagName("diagram"),F=0;F<H.length;F++){var K=
-mxUtils.getTextContent(H[F]),O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<u.children.length?(n.splice(y>
-x?y-1:y,0,n.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(n.push(n.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,
-0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||
-t.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};p.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat=
-"no-repeat";0==n.length&&Graph.fileSupport&&(u.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"));c.appendChild(q);var v={},x=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};
-mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var z=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==u||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,p,k,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||
-/(\.vs(x|sx?))($|\?)/i.test(l.name))?a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=
-u.scrollHeight))})):(d(c,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",g);mxEvent.addListener(u,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className=
-"geBtn";a.editor.cancelFirst&&b.appendChild(e);"draw.io"!=a.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(d){a.spinner.stop();if(null!=d){var b=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),b=b+((0==b.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(d));d=new EmbedDialog(a,window.location.protocol+
-"//"+window.location.host+"/"+b,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(d.container,440,240,!0);d.init()}else k.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){a.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));
-p=mxUtils.button(mxResources.get("export"),function(){var d=a.createLibraryDataFromImages(n),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");
-D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,p){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,p),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");
-p.className="geBtn";b.appendChild(p)}p=mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,
-e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(t.value,n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");
-l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=b-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};l.appendChild(m);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border=
-"1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var t="";null!=c.shape&&null!=c.shape.stencil&&(t=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,t||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,
-20/k-c.y);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),k.className="geBtn",l.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&
-l.appendChild(k);var u=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=t){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&(d.setSelectionCell(b),d.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){u(n,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,e,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(k);f.appendChild(l);g.appendChild(f);d.appendChild(g);this.container=d},CustomDialog=function(a,e,c,b,k,f,
-l,d,g){var m=document.createElement("div");m.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=l&&e.appendChild(l);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",e.appendChild(l));g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});g.className="geBtn";d&&(g.style.display="none");a.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(k||mxResources.get("ok"),
-function(){a.hideDialog();null!=c&&c()});e.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);m.appendChild(e);this.cancelBtn=g;this.okButton=k;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
+function(){a.hideDialog()});f.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var e=[],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&e.push(c)}a.sidebar.showEntries(e.join(";"),v.checked,!0)});e.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";e=document.createElement("tr");y.style.width="100%";d=document.createElement("td");var g=document.createElement("td"),
+l=document.createElement("td"),x=mxUtils.bind(this,function(e,b,c){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var k=document.createElement("span");mxUtils.write(k,b);b=document.createElement("div");b.style.display="block";b.appendChild(d);b.appendChild(k);mxEvent.addListener(k,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});e.appendChild(b);return function(){return d.checked?c:null}});e.appendChild(d);e.appendChild(g);
+e.appendChild(l);f.appendChild(e);y.appendChild(f);for(var u=[],A=0,f=0;f<c.length;f++)for(e=0;e<c[f].entries.length;e++)A++;for(var B=[d,g,l],z=0,f=0;f<c.length;f++)(function(a){for(var e=0;e<a.entries.length;e++){var b=a.entries[e];u.push(x(B[Math.floor(z/(A/3))],b.title,b.id));z++}})(c[f]);b.appendChild(y);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=
+!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var e=["search"],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&e.push(c)}a.sidebar.showEntries(0<e.length?
+e.join(";"):"",v.checked);a.hideDialog()});e.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(e)):(c.appendChild(e),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a,d,c){function b(){if(0==l.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var e=0;e<l.length;e++){var d=document.createElement("span");d.style.whiteSpace=
+"nowrap";var k=document.createElement("span");k.className="geSprite geSprite-delete";k.style.position="relative";k.style.cursor="pointer";k.style.top="5px";k.style.marginRight="4px";k.style.display="inline-block";d.appendChild(k);mxUtils.write(d,l[e]);f.appendChild(d);mxUtils.br(f);mxEvent.addListener(k,"click",function(e){return function(){a.confirm(mxResources.get("delete")+' "'+l[e]+'"?',function(){null!=c&&c(l[e]);l.splice(e,1);b()})}}(e))}}}var g=document.createElement("div"),f=document.createElement("div");
+f.style.height="120px";f.style.overflow="auto";var l=mxSettings.getPlugins().slice();g.appendChild(f);b();var n=mxUtils.button(mxResources.get("add")+"...",null!=d?function(){d(function(a){a&&0>mxUtils.indexOf(l,a)&&l.push(a);b()})}:function(){var e=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("builtinPlugins")+": ");e.appendChild(c);var d=document.createElement("select");d.style.width="150px";for(c=0;c<App.publicPlugin.length;c++){var k=
+document.createElement("option");mxUtils.write(k,App.publicPlugin[c]);k.value=App.publicPlugin[c];d.appendChild(k)}e.appendChild(d);mxUtils.br(e);mxUtils.br(e);c=mxUtils.button(mxResources.get("custom")+"...",function(){var e=new FilenameDialog(a,"",mxResources.get("add"),function(e){a.hideDialog();if(null!=e&&0<e.length){e=e.split(";");for(var c=0;c<e.length;c++){var d=e[c],k=App.pluginRegistry[d];null!=k&&(d=k);0<d.length&&0>mxUtils.indexOf(l,d)&&l.push(d)}b()}},mxResources.get("enterValue")+" ("+
+mxResources.get("url")+")");a.showDialog(e.container,300,80,!0,!0);e.init()});c.className="geBtn";e=new CustomDialog(a,e,mxUtils.bind(this,function(){var a=App.pluginRegistry[d.value];0>mxUtils.indexOf(l,a)&&(l.push(a),b())}),null,null,null,c);a.showDialog(e.container,300,80,!0,!0)});n.className="geBtn";var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var k=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(l);mxSettings.save();a.hideDialog();
+a.alert(mxResources.get("restartForChangeRequired"))});k.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");m.appendChild(p);a.editor.cancelFirst?(m.appendChild(e),m.appendChild(n),m.appendChild(k)):(m.appendChild(n),m.appendChild(k),
+m.appendChild(e));g.appendChild(m);this.container=g},CropImageDialog=function(a,d,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:d})}var g=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height=
+"300px";g.appendChild(f);var l=null;this.init=function(){b()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("id","croppieCircle");n.style.margin="5px";g.appendChild(n);var e=document.createElement("label");e.setAttribute("for","croppieCircle");mxUtils.write(e,mxResources.get("circle"));g.appendChild(e);var k,m,p,q,e=document.createElement("div");k=document.createElement("button");m=document.createElement("button");e.appendChild(k);e.appendChild(m);p=document.createElement("i");
+q=document.createElement("i");k.appendChild(p);m.appendChild(q);e.className="cr-rotate-controls";e.style["float"]="right";e.style.position="inherit";k.className="cr-rotate-l";m.className="cr-rotate-r";g.appendChild(e);k.addEventListener("click",function(){l.rotate(-90)});m.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(n,"change",function(){b(this.checked)});n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";e=mxUtils.button(mxResources.get("apply"),
+function(){l.result({type:"base64",size:"original"}).then(function(e){c(e);a.hideDialog()})});e.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(n),k.appendChild(e)):(k.appendChild(e),k.appendChild(n));g.appendChild(k);this.container=g},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,g=document.createElement("div"),f=document.createElement("table"),
+l=document.createElement("tbody"),n=document.createElement("tr"),e=document.createElement("td"),k=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(e,mxResources.get("relative")+":");var m=document.createElement("input");m.setAttribute("type","checkbox");null!=b&&b.relative&&(m.setAttribute("checked","checked"),m.defaultChecked=!0);this.init=function(){m.focus()};k.appendChild(m);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");
+k=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";k.appendChild(p);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.y:
+"";k.appendChild(q);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";k.appendChild(u);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");
+mxUtils.write(e,mxResources.get("dy")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b&&null!=b.offset?b.offset.y:"";k.appendChild(t);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";
+k.appendChild(v);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=b?b.height:"";k.appendChild(y);n.appendChild(e);n.appendChild(k);l.appendChild(n);n=document.createElement("tr");e=document.createElement("td");k=document.createElement("td");mxUtils.write(e,
+mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(x);n.appendChild(e);n.appendChild(k);l.appendChild(n);f.appendChild(l);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();
+try{for(var e=0;e<d.length;e++){var b=c.getCellGeometry(d[e]);null!=b&&(b=b.clone(),c.isCellMovable(d[e])&&(b.relative=m.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(b.y=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(t.value))),c.isCellResizable(d[e])&&(0<mxUtils.trim(v.value).length&&(b.width=
+Number(v.value)),0<mxUtils.trim(y.value).length&&(b.height=Number(y.value))),c.getModel().setGeometry(d[e],b));0<mxUtils.trim(x.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[e]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),
+f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,c,b,g,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var e=null;if(null!=a)for(var b=u.firstChild,e=0;null!=b&&b!=a;)b=b.nextSibling,e++;return e}function n(e,b,c,d,k,f,p,g,q){try{if(a.spinner.stop(),null==b||"image/"==b.substring(0,6))if(null==e&&null!=p||null==v[e]){var J=function(){L.innerHTML="";L.style.cursor="pointer";L.style.whiteSpace="nowrap";L.style.textOverflow=
+"ellipsis";mxUtils.write(L,null!=F.title&&0<F.title.length?F.title:mxResources.get("untitled"));L.style.color=null==F.title||0==F.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var G=k,I=f;if(k>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,f));k*=C;f*=C}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var x=document.createElement("div");x.setAttribute("draggable","true");x.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";x.style.position="relative";x.style.cursor="move";mxUtils.setPrefixedStyle(x.style,"transition","transform .1s ease-in-out");if(null!=e){var D=document.createElement("img");D.setAttribute("src",B.convert(e));D.style.width=G+"px";D.style.height=I+"px";D.style.margin="10px";D.style.paddingBottom=Math.floor((100-I)/2)+"px";D.style.paddingLeft=Math.floor((100-G)/2)+"px";x.appendChild(D)}else if(null!=p){var M=a.stringToCells(Graph.decompress(p.xml));0<M.length&&
+(a.sidebar.createThumb(M,100,100,x,null,!0,!1),x.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",x.firstChild.style.cursor="")}var N=document.createElement("img");N.setAttribute("src",Editor.closeImage);N.setAttribute("border","0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.position="absolute";N.style.marginLeft="-12px";N.style.zIndex="1";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(a){mxEvent.consume(a)});
+(function(a,e,b){mxEvent.addListener(N,"click",function(c){v[e]=null;for(var d=0;d<m.length;d++)if(null!=m[d].data&&m[d].data==e||null!=m[d].xml&&null!=b&&m[d].xml==b.xml){m.splice(d,1);break}x.parentNode.removeChild(a);0==m.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(c)});mxEvent.addListener(N,"dblclick",function(a){mxEvent.consume(a)})})(x,e,p);x.appendChild(N);x.style.marginBottom="30px";var L=document.createElement("div");L.style.position=
+"absolute";L.style.boxSizing="border-box";L.style.bottom="-18px";L.style.left="10px";L.style.right="10px";L.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";L.style.overflow="hidden";L.style.textAlign="center";var F=null;null!=e?(F={data:e,w:k,h:f,title:q},null!=g&&(F.aspect=g),v[e]=D,m.push(F)):null!=p&&(p.aspect="fixed",m.push(p),F=p);mxEvent.addListener(L,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});J();x.appendChild(L);mxEvent.addListener(L,"mousedown",
+function(a){"true"!=L.getAttribute("contentEditable")&&mxEvent.consume(a)});M=function(e){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,F.title||"",mxResources.get("ok"),function(a){null!=a&&(F.title=a,J())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(e)}else if("true"!=L.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==F.title||0==F.title.length)L.innerHTML=
+"";L.style.textOverflow="";L.style.whiteSpace="";L.style.cursor="text";L.style.color="";L.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(L.style,"user-select","text");L.focus();document.execCommand("selectAll",!1,null);A=function(){L.removeAttribute("contentEditable");L.style.cursor="pointer";F.title=L.innerHTML;J()};mxEvent.consume(e)}};mxEvent.addListener(L,"click",M);mxEvent.addListener(x,"dblclick",M);u.appendChild(x);mxEvent.addListener(x,"dragstart",function(a){null==e&&null!=
+p&&(N.style.visibility="hidden",L.style.visibility="hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);y=l(a);mxClient.IS_GC&&(x.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(x.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(x,30);N.style.visibility="";L.style.visibility=""},0)});mxEvent.addListener(x,"dragend",function(a){"hidden"==N.style.visibility&&(N.style.visibility="",L.style.visibility="");y=null;mxUtils.setOpacity(x,100);mxUtils.setPrefixedStyle(x.style,
+"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(G=mxUtils.parseXml(e),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var E=0;E<I.length;E++)null!=I[E].xml?n(null,null,0,0,0,0,I[E]):n(I[E].data,null,0,0,I[E].w,I[E].h,null,"fixed",I[E].title);k=!0}else if("mxfile"==G.documentElement.nodeName){for(var H=G.documentElement.getElementsByTagName("diagram"),E=0;E<H.length;E++){var I=
+mxUtils.getTextContent(H[E]),M=a.stringToCells(Graph.decompress(I)),T=a.editor.graph.getBoundingBoxFromGeometry(M);n(null,null,0,0,0,0,{xml:I,w:T.width,h:T.height})}k=!0}}catch(P){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(P){}return null}function e(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function k(e){e.stopPropagation();e.preventDefault();z=!1;x=l(e);if(null!=y)null!=x&&x<u.children.length?(m.splice(x>
+y?x-1:x,0,m.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[x])):(m.push(m.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<e.dataTransfer.files.length)a.importFiles(e.dataTransfer.files,0,0,a.maxImageSize,C(e));else if(0<=mxUtils.indexOf(e.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(e.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){n(b,null,0,
+0,a.width,a.height);u.scrollTop=u.scrollHeight})}e.stopPropagation();e.preventDefault()}var m=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||
+q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat=
+"no-repeat";0==m.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));c.appendChild(t);var v={},y=null,x=null,A=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};
+mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",d);var B=new mxUrlConverter,z=!1;if(null!=b)for(d=0;d<b.length;d++)p=b[d],n(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var e=mxEvent.getSource(a);null!=e;){if(e==u||e==t){a.stopPropagation();a.preventDefault();break}e=e.parentNode}});var C=function(e){return function(b,c,d,k,m,f,p,g,q){null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q.name)||
+/(\.vs(x|sx?))($|\?)/i.test(q.name))?a.importVisio(q,mxUtils.bind(this,function(a){n(a,c,d,k,m,f,p,"fixed",mxEvent.isAltDown(e)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,q.name)?a.parseFile(q,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=b.status&&(n(b.responseText,c,d,k,m,f,p,"fixed",mxEvent.isAltDown(e)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=
+u.scrollHeight))})):(n(b,c,d,k,m,f,p,"fixed",mxEvent.isAltDown(e)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",e);mxEvent.addListener(u,"drop",k);mxEvent.addListener(t,"dragover",e);mxEvent.addListener(t,"drop",k);c.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className=
+"geBtn";a.editor.cancelFirst&&b.appendChild(d);"draw.io"!=a.getServiceName()||null==g||g.constructor!=DriveLibrary&&g.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(e){a.spinner.stop();if(null!=e){var b=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),b=b+((0==b.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(e));e=new EmbedDialog(a,window.location.protocol+
+"//"+window.location.host+"/"+b,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(e.container,440,240,!0);e.init()}else g.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){a.drive.showPermissions(g.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));
+p=mxUtils.button(mxResources.get("export"),function(){var e=a.createLibraryDataFromImages(m),b=q.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(e,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(e))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");
+D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(e){z=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,d,k,m,f,p,g){null!=D.files&&(C(e)(a,b,c,d,k,m,f,p,g),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");
+p.className="geBtn";b.appendChild(p)}p=mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,e,b){z=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var c=a.indexOf(",");0<c&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))}n(a,null,0,0,e,b);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(e,b,c,d){a.saveLibrary(e,b,c,
+d)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(q.value,m,g,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(d);c.appendChild(b);this.container=c},EditShapeDialog=function(a,d,c,b,g){b=null!=b?b:300;g=null!=g?g:120;var f,l,n=document.createElement("table"),e=document.createElement("tbody");n.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");
+l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);e.appendChild(f);f=document.createElement("tr");l=document.createElement("td");var k=document.createElement("textarea");k.style.outline="none";k.style.resize="none";k.style.width=b-200+"px";k.style.height=g+"px";this.textarea=k;this.init=function(){k.focus();k.scrollTop=0};l.appendChild(k);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border=
+"1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=g+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var m=new Graph(c);m.setEnabled(!1);var p=a.editor.graph.cloneCell(d);m.addCells([p]);c=m.view.getState(p);var q="";null!=c.shape&&null!=c.shape.stencil&&(q=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(k,q||"");c=m.getGraphBounds();g=Math.min(160/c.width,(g-40)/c.height);m.view.scaleAndTranslate(g,20/g-c.x,
+20/g-c.y);f.appendChild(l);e.appendChild(f);f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",l.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&
+l.appendChild(g);var u=function(e,b,c){var d=k.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!e.model.contains(b),!c||m||d!=q){d=Graph.compress(d);e.getModel().beginUpdate();try{if(m){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;e.addCell(b)}e.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+d+")",[b])}catch(z){throw z;}finally{e.getModel().endUpdate()}m&&(e.setSelectionCell(b),e.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){u(m,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(g);f.appendChild(l);e.appendChild(f);n.appendChild(e);this.container=n},CustomDialog=function(a,d,c,b,g,f,
+l,n,e){var k=document.createElement("div");k.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";null!=l&&d.appendChild(l);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",d.appendChild(l));e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});e.className="geBtn";n&&(e.style.display="none");a.editor.cancelFirst&&d.appendChild(e);g=mxUtils.button(g||mxResources.get("ok"),
+function(){a.hideDialog();null!=c&&c()});d.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(e);k.appendChild(d);this.cancelBtn=e;this.okButton=g;this.container=k},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">&#x1F6C8; '+
-mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",e=document.createElement("div");e.innerHTML=a;e.className="geTemplateDlg";
-var a=window.innerWidth,c=window.innerHeight,b=987,k=712;.9*a<b&&(b=Math.max(.9*a,600),e.style.width=b+"px");.9*c<k&&(k=Math.max(.9*c,300),e.style.height=k+"px");this.width=b;this.height=k;this.container=e};
-TemplatesDialog.prototype.init=function(a,e,c,b,k,f,l,d,g,m){function n(){null!=F&&(F.style.fontWeight="normal",F.style.textDecoration="none",F=null)}function p(a,d,b,c,e,g,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+d).src="/images/"+b+"-sel.svg";C.querySelector("."+e).src="/images/"+
-g+".svg";return!0}function t(a){function d(a){Y.removeChild(c);C.removeChild(b);Y.scrollTop=g}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var e=document.createElement("img");e.src=a;c.appendChild(e);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
-a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var g=Y.scrollTop;mxEvent.addListener(a,"click",d);mxEvent.addListener(b,"click",d);Y.appendChild(c);Y.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,d,b){if(null!=H){for(var c=H.className.split(" "),e=0;e<c.length;e++)if(-1<c[e].indexOf("Active")){c.splice(e,1);break}H.className=c.join(" ")}null!=a?(H=a,H.className+=" "+d,I=b,ba.className="geTempDlgCreateBtn"):(I=H=null,ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
-function q(d){if(null!=I){var b=I;I=null;ba.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";b.isExternal?(1==d?m(b.url,b,"nameInput.value"):g(b.url,b,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+b.url,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(e(d.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var d=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<d.length;b++)d[b].style.display=
-a}function x(a,d,b){function c(){ba.innerHTML=d?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!d)}W.innerHTML="";u();O=a;var e=null;if(b){e=document.createElement("table");e.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
-mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));g.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));g.appendChild(m);e.appendChild(g);W.appendChild(e)}for(g=0;g<a.length;g++){a[g].isExternal=!d;var f=a[g].url,m=mxUtils.htmlEntities(a[g].title),n=a[g].tooltip||a[g].title,p=a[g].imgUrl,k=mxUtils.htmlEntities(a[g].changedBy||""),l=mxUtils.htmlEntities(a[g].lastModifiedOn||
-"");p||(p=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var I=document.createElement("tr"),p=document.createElement("td"),z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramListPreviewBtn";z.setAttribute("title",mxResources.get("preview"));p.appendChild(z);n=document.createElement("span");n.className="geTempDlgDiagramTitle";n.innerHTML=m;p.appendChild(n);I.appendChild(p);p=document.createElement("td");
-p.innerHTML=k;I.appendChild(p);p=document.createElement("td");p.innerHTML=l;I.appendChild(p);e.appendChild(I);null==H&&(c(),u(I,"geTempDlgDiagramsListGridActive",a[g]));(function(a,d){mxEvent.addListener(I,"click",function(){H!=d&&(c(),u(d,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(I,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],I)}else{var G=document.createElement("div");G.className="geTempDlgDiagramTile";G.setAttribute("title",n);null==H&&(c(),u(G,"geTempDlgDiagramTileActive",
-a[g]));k=document.createElement("div");k.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var B=document.createElement("img");B.style.display="none";(function(a,d){B.onload=function(){d.className="geTempDlgDiagramTileImg";a.style.display=""};B.onerror=function(){d.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(B,k);B.src=p;k.appendChild(B);G.appendChild(k);k=document.createElement("div");k.className="geTempDlgDiagramTileLbl";k.innerHTML=null!=m?m:"";G.appendChild(k);
-z=document.createElement("img");z.src="/images/icon-search.svg";z.className="geTempDlgDiagramPreviewBtn";z.setAttribute("title",mxResources.get("preview"));G.appendChild(z);(function(a,d){mxEvent.addListener(G,"click",function(){H!=d&&(c(),u(d,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(G,"dblclick",q);mxEvent.addListener(z,"click",function(){t(a)})})(a[g],G);W.appendChild(G)}}}function y(a,d){Z.innerHTML="";u();for(var b=!d&&5<a.length?5:a.length,c=0;c<b;c++){var e=a[c];e.isCategory=!0;
-var g=document.createElement("div"),m=mxResources.get(e.title);null==m&&(m=e.title.substring(0,1).toUpperCase()+e.title.substring(1));g.className="geTempDlgNewDiagramCatItem";g.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==H&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(g,"geTempDlgNewDiagramCatItemActive",e));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var n=document.createElement("img");
-n.src=NEW_DIAGRAM_CATS_PATH+"/"+e.img;f.appendChild(n);g.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;g.appendChild(f);Z.appendChild(g);(function(a,d){mxEvent.addListener(g,"click",function(){H!=d&&(ba.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(d,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(g,"dblclick",q)})(e,g)}S.style.display=5>a.length?"none":""}function A(a){var d=C.querySelector(".geTemplatesList"),
-b;for(b in a){var c=document.createElement("div"),e=mxResources.get(b),g=a[b];null==e&&(e=b.substring(0,1).toUpperCase()+b.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",e+" ("+g.length+")");e=mxUtils.htmlEntities(e);15<e.length&&(e=e.substring(0,15)+"&hellip;");c.innerHTML=e+" ("+g.length+")";d.appendChild(c);(function(d,b,e){mxEvent.addListener(c,"click",function(){F!=e&&(null!=F?(F.style.fontWeight="normal",F.style.textDecoration="none"):(U.style.display="none",V.style.minHeight=
-"100%"),F=e,F.style.fontWeight="bold",F.style.textDecoration="underline",Y.scrollTop=0,D&&(E=!0),aa.innerHTML=b,ca.style.display="none",x(a[d],!0))})})(b,e,c)}}function z(a){l&&(Y.scrollTop=0,W.innerHTML="",T.spin(W),E=!1,D=!0,aa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),J=null,l(X,a?null:f))}function B(a){n();Y.scrollTop=0;W.innerHTML="";T.spin(W);E=!1;D=!0;da=null;aa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
-' "'+mxUtils.htmlEntities(a)+'"';d(a,X,G?null:f);J=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,E=!1,F=null,H=null,I=null,K=!1,G=!0,L=!1,O=[],J,S=C.querySelector(".geTempDlgShowAllBtn"),W=C.querySelector(".geTempDlgDiagramsTiles"),aa=C.querySelector(".geTempDlgDiagramsListTitle"),ca=C.querySelector(".geTempDlgDiagramsListBtns"),Y=C.querySelector(".geTempDlgContent"),V=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
-Z=C.querySelector(".geTempDlgNewDiagramCatList"),ba=C.querySelector(".geTempDlgCreateBtn"),T=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(C.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){n();U.style.display="";V.style.minHeight="calc(100% - 280px)";z(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
-"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(G=!1,null==J?z(G):B(J))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(L=!0,x(O,!1,L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(L=!1,x(O,!1,L))});mxEvent.addListener(S,"click",function(){K?(U.style.height="280px",Z.style.height="190px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(ga)):(U.style.height="440px",Z.style.height="355px",S.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
-null,"- Show less")),y(ga,!0));K=!K});var P=!1,Q=!1,M={},ga=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var d=a.getAttribute("url");if(null!=d){var b=d.indexOf("/"),d=d.substring(0,b),b=M[d];null==b&&(R++,b=[],M[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
-a.nextSibling}A(M)}});mxUtils.get(k,function(a){if(!Q){Q=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ga.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(ga)}});var X=function(a,d){ca.style.display="";T.stop();D=!1;E?E=!1:d?W.innerHTML=d:0==a.length?W.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-x(a,!1,L)};z(G);var da=null;d&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var d=this;null!=da&&clearTimeout(da);13==a.keyCode?B(d.value):da=setTimeout(function(){B(d.value)},500)});mxEvent.addListener(ba,"click",q);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){q(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
-var BtnDialog=function(a,e,c,b){var k=document.createElement("div");k.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var l="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==a.drive?(l=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?
-(l=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(l=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==a.gitLab?(l=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==a.trello&&(l=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[l],"You are now authorized in {1}"));
-c=mxUtils.button(c,b);c.insertBefore(d,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";k.appendChild(f);k.appendChild(a);k.appendChild(c);this.container=k},FontDialog=function(a,e,c,b,k){function f(a){this.style.border="";13==a.keyCode&&A.click()}var l,d,g,m=document.createElement("table"),n=document.createElement("tbody");m.style.marginTop="8px";l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
-"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","sysfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-sysfonts");d.appendChild(p);g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);
-l=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")+":");l.appendChild(d);var t=document.createElement("input");"s"==b&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(t);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");
-d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");d.appendChild(u);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
-null,"Google Fonts"));d.appendChild(g);mxClient.IS_CHROMEAPP||a.isOffline()&&!EditorUi.isElectronApp||(g=a.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(g));l.appendChild(d);n.appendChild(l);l=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")+":");
-l.appendChild(d);var q=document.createElement("input");"g"==b&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(q);l.appendChild(d);n.appendChild(l);l=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value",
-"webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");d.appendChild(v);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(g);l.appendChild(d);n.appendChild(l);l=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")+":");l.appendChild(d);var x=document.createElement("input");"w"==b&&x.setAttribute("value",e);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(x);l.appendChild(d);n.appendChild(l);l=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")+":");l.appendChild(d);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(y);l.appendChild(d);n.appendChild(l);this.init=function(){var a=t;"g"==b?a=q:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");d=document.createElement("td");
-d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");a.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){var d,b,c;p.checked?(d=t.value,c="s"):u.checked?(d=
-q.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(d).replace(/%20/g,"+"),c="g"):v.checked&&(d=x.value,b=y.value,c="w");var e;e=b;var g=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==d||0==d.length?(m.querySelector(".dlg_fontName_"+g).style.border="1px solid red",e=!1):"w"!=g||f.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(d,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",
-f);mxEvent.addListener(q,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(q,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});d.appendChild(A);a.editor.cancelFirst||
-d.appendChild(e);l.appendChild(d);n.appendChild(l);m.appendChild(n);this.container=m};
-function AspectDialog(a,e,c,b,k){this.aspect={pageId:e||a.pages[0].getId(),layerIds:c||[]};e=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));e.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";e.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));e.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
-e.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var l=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(l);l.className="geBtn gePrimaryBtn";
-a.editor.cancelFirst||c.appendChild(f);l.setAttribute("disabled","disabled");this.okBtn=l;e.appendChild(c);this.container=e}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var e=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(e.getId(),e.getName(),e.node,e.root)}};
-AspectDialog.prototype.createViewer=function(a,e,c){mxEvent.disableContextMenu(a);a.style.userSelect="none";var b=new Graph(a);b.setTooltips(!1);b.setEnabled(!1);b.setPanning(!1);b.minFitScale=null;b.maxFitScale=null;b.centerZoom=!0;e=Editor.parseDiagramNode(e);if(null!=e){var k=e.getAttribute("background");if(null==k||""==k||k==mxConstants.NONE)k="#ffffff";a.style.backgroundColor=k;k=new mxCodec(e.ownerDocument);a=b.getModel();k.decode(e,a);e=a.getChildCount(a.root);for(var k=null==c,f=0;f<e;f++){var l=
-a.getChildAt(a.root,f);a.setVisible(l,k||c==l.id)}b.maxFitScale=1;b.fit(0);b.center()}return b};
-AspectDialog.prototype.createPageItem=function(a,e,c,b){var k=document.createElement("div");k.className="geAspectDlgListItem";k.setAttribute("data-page-id",a);k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(k);var f=this.createViewer(k.childNodes[0],c);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=
-k;this.selectedPage=a;k.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var b=f.model,b=b.getChildCells(b.getRoot()),d=0;d<b.length;d++)this.createLayerItem(b[d],a,f,c)});mxEvent.addListener(k,"click",e);this.aspect.pageId==a&&e()};
-AspectDialog.prototype.createLayerItem=function(a,e,c,b){e=c.convertValueToString(a)||mxResources.get("background")||"Background";var k=document.createElement("div");k.setAttribute("data-layer-id",a.id);k.className="geAspectDlgListItem";k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(k);this.createViewer(k.childNodes[0],b,a.id);b=mxUtils.bind(this,function(){0<=k.className.indexOf("geAspectDlgListItemSelected")?
-(k.className="geAspectDlgListItem",delete this.selectedLayers[a.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(k.className+=" geAspectDlgListItemSelected",this.selectedLayers[a.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(k,"click",b);-1!=this.aspect.layerIds.indexOf(a.id)&&b()};
-var FilePropertiesDialog=function(a){var e,c,b=document.createElement("table"),k=document.createElement("tbody");b.style.width="100%";b.style.marginTop="8px";var f=a.getCurrentFile();e=null!=f&&null!=f.getTitle()?f.getTitle():this.editorUi.defaultFilename;c=null;if(/(\.png)$/i.test(e)){var l=1,d=0;e=a.fileNode;null!=e&&(e.hasAttribute("scale")&&(l=parseFloat(e.getAttribute("scale"))),e.hasAttribute("border")&&(d=parseInt(e.getAttribute("border"))));e=document.createElement("tr");c=document.createElement("td");
-c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");e.appendChild(c);var g=document.createElement("input");g.setAttribute("value",100*l+"%");g.style.marginLeft="4px";g.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(g);e.appendChild(c);k.appendChild(e);e=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";
-mxUtils.write(c,mxResources.get("borderWidth")+":");e.appendChild(c);var m=document.createElement("input");m.setAttribute("value",d);m.style.marginLeft="4px";m.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(m);e.appendChild(c);k.appendChild(e);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("scale",
-Math.max(0,parseInt(g.value)/100)),a.fileNode.setAttribute("border",Math.max(0,parseInt(m.value))),null!=f&&f.fileChanged());a.hideDialog()}}else{l=null!=f?f.isCompressed():Editor.compressXml;e=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");e.appendChild(c);var n=document.createElement("input");n.setAttribute("type","checkbox");l&&(n.setAttribute("checked","checked"),
-n.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(n);e.appendChild(c);k.appendChild(e);this.init=function(){n.focus()};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("compressed",n.checked?"true":"false"),null!=f&&f.fileChanged());a.hideDialog()}}l=mxUtils.button(mxResources.get("apply"),c);l.className="geBtn gePrimaryBtn";e=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";
-c.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);c.appendChild(l);a.editor.cancelFirst||c.appendChild(d);e.appendChild(c);k.appendChild(e);b.appendChild(k);this.container=b};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",
+mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",d=document.createElement("div");d.innerHTML=a;d.className="geTemplateDlg";
+var a=window.innerWidth,c=window.innerHeight,b=987,g=712;.9*a<b&&(b=Math.max(.9*a,600),d.style.width=b+"px");.9*c<g&&(g=Math.max(.9*c,300),d.style.height=g+"px");this.width=b;this.height=g;this.container=d};
+TemplatesDialog.prototype.init=function(a,d,c,b,g,f,l,n,e,k){function m(){null!=E&&(E.style.fontWeight="normal",E.style.textDecoration="none",E=null)}function p(a,e,b,c,d,k,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";C.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");C.querySelector("."+e).src="/images/"+b+"-sel.svg";C.querySelector("."+d).src="/images/"+
+k+".svg";return!0}function q(a){function e(a){aa.removeChild(c);C.removeChild(b);aa.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var b=document.createElement("div");b.className="geTempDlgDialogMask";C.appendChild(b);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
+a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var k=aa.scrollTop;mxEvent.addListener(a,"click",e);mxEvent.addListener(b,"click",e);aa.appendChild(c);aa.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,e,b){if(null!=H){for(var c=H.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}H.className=c.join(" ")}null!=a?(H=a,H.className+=" "+e,J=b,ca.className="geTempDlgCreateBtn"):(J=H=null,ca.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
+function t(b){if(null!=J){var c=J;J=null;ca.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";c.isExternal?(1==b?k(c.url,c,"nameInput.value"):e(c.url,c,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+c.url,mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()&&(d(e.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var e=C.querySelectorAll(".geTempDlgLinkToDiagram"),b=0;b<e.length;b++)e[b].style.display=
+a}function y(a,e,b){function c(){ca.innerHTML=e?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!e)}R.innerHTML="";u();N=a;var d=null;if(b){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));k.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=
+mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));k.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));k.appendChild(m);d.appendChild(k);R.appendChild(d)}for(k=0;k<a.length;k++){a[k].isExternal=!e;var f=a[k].url,m=mxUtils.htmlEntities(a[k].title),p=a[k].tooltip||a[k].title,g=a[k].imgUrl,l=mxUtils.htmlEntities(a[k].changedBy||""),J=mxUtils.htmlEntities(a[k].lastModifiedOn||
+"");g||(g=TEMPLATE_PATH+"/"+f.substring(0,f.length-4)+".png");f=b?50:15;null!=m&&m.length>f&&(m=m.substring(0,f)+"&hellip;");if(b){var n=document.createElement("tr"),g=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));g.appendChild(B);p=document.createElement("span");p.className="geTempDlgDiagramTitle";p.innerHTML=m;g.appendChild(p);n.appendChild(g);g=document.createElement("td");
+g.innerHTML=l;n.appendChild(g);g=document.createElement("td");g.innerHTML=J;n.appendChild(g);d.appendChild(n);null==H&&(c(),u(n,"geTempDlgDiagramsListGridActive",a[k]));(function(a,e){mxEvent.addListener(n,"click",function(){H!=e&&(c(),u(e,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(n,"dblclick",t);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],n)}else{var z=document.createElement("div");z.className="geTempDlgDiagramTile";z.setAttribute("title",p);null==H&&(c(),u(z,"geTempDlgDiagramTileActive",
+a[k]));l=document.createElement("div");l.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var G=document.createElement("img");G.style.display="none";(function(a,e){G.onload=function(){e.className="geTempDlgDiagramTileImg";a.style.display=""};G.onerror=function(){e.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(G,l);G.src=g;l.appendChild(G);z.appendChild(l);l=document.createElement("div");l.className="geTempDlgDiagramTileLbl";l.innerHTML=null!=m?m:"";z.appendChild(l);
+B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);(function(a,e){mxEvent.addListener(z,"click",function(){H!=e&&(c(),u(e,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(z,"dblclick",t);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],z);R.appendChild(z)}}}function x(a,e){V.innerHTML="";u();for(var b=!e&&5<a.length?5:a.length,c=0;c<b;c++){var d=a[c];d.isCategory=!0;
+var k=document.createElement("div"),m=mxResources.get(d.title);null==m&&(m=d.title.substring(0,1).toUpperCase()+d.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"&hellip;");null==H&&(ca.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(k,"geTempDlgNewDiagramCatItemActive",d));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");
+p.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;f.appendChild(p);k.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=m;k.appendChild(f);V.appendChild(k);(function(a,e){mxEvent.addListener(k,"click",function(){H!=e&&(ca.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(e,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",t)})(d,k)}K.style.display=5>a.length?"none":""}function A(a){var e=C.querySelector(".geTemplatesList"),
+b;for(b in a){var c=document.createElement("div"),d=mxResources.get(b),k=a[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+k.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");c.innerHTML=d+" ("+k.length+")";e.appendChild(c);(function(e,b,d){mxEvent.addListener(c,"click",function(){E!=d&&(null!=E?(E.style.fontWeight="normal",E.style.textDecoration="none"):(U.style.display="none",fa.style.minHeight=
+"100%"),E=d,E.style.fontWeight="bold",E.style.textDecoration="underline",aa.scrollTop=0,D&&(F=!0),Y.innerHTML=b,da.style.display="none",y(a[e],!0))})})(b,d,c)}}function B(a){l&&(aa.scrollTop=0,R.innerHTML="",ea.spin(R),F=!1,D=!0,Y.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),L=null,l(S,a?null:f))}function z(a){m();aa.scrollTop=0;R.innerHTML="";ea.spin(R);F=!1;D=!0;Z=null;Y.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+
+' "'+mxUtils.htmlEntities(a)+'"';n(a,S,G?null:f);L=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var C=this.container,D=!1,F=!1,E=null,H=null,J=null,I=!1,G=!0,M=!1,N=[],L,K=C.querySelector(".geTempDlgShowAllBtn"),R=C.querySelector(".geTempDlgDiagramsTiles"),Y=C.querySelector(".geTempDlgDiagramsListTitle"),da=C.querySelector(".geTempDlgDiagramsListBtns"),aa=C.querySelector(".geTempDlgContent"),fa=C.querySelector(".geTempDlgDiagramsList"),U=C.querySelector(".geTempDlgNewDiagramCat"),
+V=C.querySelector(".geTempDlgNewDiagramCatList"),ca=C.querySelector(".geTempDlgCreateBtn"),ea=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(C.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){m();U.style.display="";fa.style.minHeight="calc(100% - 280px)";B(G)});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){p(this,"geTempDlgAllDiagramsBtnImg",
+"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(G=!0,null==L?B(G):z(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){p(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(G=!1,null==L?B(G):z(L))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){p(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
+"tiles",!1)&&(M=!0,y(N,!1,M))});mxEvent.addListener(C.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){p(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(M=!1,y(N,!1,M))});mxEvent.addListener(K,"click",function(){I?(U.style.height="280px",V.style.height="190px",K.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(P)):(U.style.height="440px",V.style.height="355px",K.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+null,"- Show less")),x(P,!0));I=!I});var O=!1,W=!1,T={},P=[],X=1;mxUtils.get(b,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var e=a.getAttribute("url");if(null!=e){var b=e.indexOf("/"),e=e.substring(0,b),b=T[e];null==b&&(X++,b=[],T[e]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}A(T)}});
+mxUtils.get(g,function(a){if(!W){W=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&P.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(P)}});var S=function(a,e){da.style.display="";ea.stop();D=!1;F?F=!1:e?R.innerHTML=e:0==a.length?R.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):y(a,!1,M)};B(G);
+var Z=null;n&&mxEvent.addListener(C.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var e=this;null!=Z&&clearTimeout(Z);13==a.keyCode?z(e.value):Z=setTimeout(function(){z(e.value)},500)});mxEvent.addListener(ca,"click",t);mxEvent.addListener(C.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){t(!0)});mxEvent.addListener(C.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
+var BtnDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var l="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";d==a.drive?(l=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
+(l=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(l=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(l=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(l=mxResources.get("gitlab"),n.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.trello&&(l=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[l],"You are now authorized in {1}"));
+c=mxUtils.button(c,b);c.insertBefore(n,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&A.click()}var l,n,e,k=document.createElement("table"),m=document.createElement("tbody");k.style.marginTop="8px";l=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace=
+"nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","sysfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-sysfonts");n.appendChild(p);e=document.createElement("label");e.setAttribute("for","fontdialog-sysfonts");mxUtils.write(e,mxResources.get("sysFonts",null,"System Fonts"));n.appendChild(e);l.appendChild(n);m.appendChild(l);
+l=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(n);var q=document.createElement("input");"s"==b&&q.setAttribute("value",d);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";n=document.createElement("td");n.appendChild(q);l.appendChild(n);m.appendChild(l);l=document.createElement("tr");
+n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");n.appendChild(u);e=document.createElement("label");e.setAttribute("for","fontdialog-googlefonts");mxUtils.write(e,mxResources.get("googleFonts",
+null,"Google Fonts"));n.appendChild(e);mxClient.IS_CHROMEAPP||a.isOffline()&&!EditorUi.isElectronApp||(e=a.menus.createHelpLink("https://fonts.google.com/"),e.getElementsByTagName("img")[0].setAttribute("valign","middle"),n.appendChild(e));l.appendChild(n);m.appendChild(l);l=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");
+l.appendChild(n);var t=document.createElement("input");"g"==b&&t.setAttribute("value",d);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_g";n=document.createElement("td");n.appendChild(t);l.appendChild(n);m.appendChild(l);l=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value",
+"webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");n.appendChild(v);e=document.createElement("label");e.setAttribute("for","fontdialog-webfonts");mxUtils.write(e,mxResources.get("webfonts",null,"Web Fonts"));n.appendChild(e);l.appendChild(n);m.appendChild(l);l=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";
+mxUtils.write(n,mxResources.get("fontname",null,"Font Name")+":");l.appendChild(n);var y=document.createElement("input");"w"==b&&y.setAttribute("value",d);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";n=document.createElement("td");n.appendChild(y);l.appendChild(n);m.appendChild(l);l=document.createElement("tr");n=document.createElement("td");n.style.whiteSpace="nowrap";n.style.fontSize="10pt";n.style.width="120px";n.style.paddingLeft="15px";mxUtils.write(n,mxResources.get("fontUrl",
+null,"Font URL")+":");l.appendChild(n);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";n=document.createElement("td");n.appendChild(x);l.appendChild(n);m.appendChild(l);this.init=function(){var a=q;"g"==b?a=t:"w"==b&&(a=y);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};l=document.createElement("tr");n=document.createElement("td");
+n.colSpan=2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",n.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&n.appendChild(d);var A=mxUtils.button(mxResources.get("apply"),function(){var e,b,c;p.checked?(e=q.value,c="s"):u.checked?(e=
+t.value,b=Editor.GOOGLE_FONTS+encodeURIComponent(e).replace(/%20/g,"+"),c="g"):v.checked&&(e=y.value,b=x.value,c="w");var d;d=b;var m=c,f=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==e||0==e.length?(k.querySelector(".dlg_fontName_"+m).style.border="1px solid red",d=!1):"w"!=m||f.test(d)?d=!0:(k.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(e,b,c),a.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",
+f);mxEvent.addListener(t,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});n.appendChild(A);a.editor.cancelFirst||
+n.appendChild(d);l.appendChild(n);m.appendChild(l);k.appendChild(m);this.container=k};
+function AspectDialog(a,d,c,b,g){this.aspect={pageId:d||a.pages[0].getId(),layerIds:c||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
+d.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var l=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(l);l.className="geBtn gePrimaryBtn";
+a.editor.cancelFirst||c.appendChild(f);l.setAttribute("disabled","disabled");this.okBtn=l;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node,d.root)}};
+AspectDialog.prototype.createViewer=function(a,d,c){mxEvent.disableContextMenu(a);a.style.userSelect="none";var b=new Graph(a);b.setTooltips(!1);b.setEnabled(!1);b.setPanning(!1);b.minFitScale=null;b.maxFitScale=null;b.centerZoom=!0;d=Editor.parseDiagramNode(d);if(null!=d){var g=d.getAttribute("background");if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";a.style.backgroundColor=g;g=new mxCodec(d.ownerDocument);a=b.getModel();g.decode(d,a);d=a.getChildCount(a.root);for(var g=null==c,f=0;f<d;f++){var l=
+a.getChildAt(a.root,f);a.setVisible(l,g||c==l.id)}b.maxFitScale=1;b.fit(0);b.center()}return b};
+AspectDialog.prototype.createPageItem=function(a,d,c,b){var g=document.createElement("div");g.className="geAspectDlgListItem";g.setAttribute("data-page-id",a);g.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(g);var f=this.createViewer(g.childNodes[0],c);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=
+g;this.selectedPage=a;g.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var b=f.model,b=b.getChildCells(b.getRoot()),d=0;d<b.length;d++)this.createLayerItem(b[d],a,f,c)});mxEvent.addListener(g,"click",d);this.aspect.pageId==a&&d()};
+AspectDialog.prototype.createLayerItem=function(a,d,c,b){d=c.convertValueToString(a)||mxResources.get("background")||"Background";var g=document.createElement("div");g.setAttribute("data-layer-id",a.id);g.className="geAspectDlgListItem";g.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(g);this.createViewer(g.childNodes[0],b,a.id);b=mxUtils.bind(this,function(){0<=g.className.indexOf("geAspectDlgListItemSelected")?
+(g.className="geAspectDlgListItem",delete this.selectedLayers[a.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(g.className+=" geAspectDlgListItemSelected",this.selectedLayers[a.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(g,"click",b);-1!=this.aspect.layerIds.indexOf(a.id)&&b()};
+var FilePropertiesDialog=function(a){var d,c,b=document.createElement("table"),g=document.createElement("tbody");b.style.width="100%";b.style.marginTop="8px";var f=a.getCurrentFile();d=null!=f&&null!=f.getTitle()?f.getTitle():this.editorUi.defaultFilename;c=null;if(/(\.png)$/i.test(d)){var l=1,n=0;d=a.fileNode;null!=d&&(d.hasAttribute("scale")&&(l=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border"))));d=document.createElement("tr");c=document.createElement("td");
+c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");d.appendChild(c);var e=document.createElement("input");e.setAttribute("value",100*l+"%");e.style.marginLeft="4px";e.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);d.appendChild(c);g.appendChild(d);d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";
+mxUtils.write(c,mxResources.get("borderWidth")+":");d.appendChild(c);var k=document.createElement("input");k.setAttribute("value",n);k.style.marginLeft="4px";k.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(k);d.appendChild(c);g.appendChild(d);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("scale",
+Math.max(0,parseInt(e.value)/100)),a.fileNode.setAttribute("border",Math.max(0,parseInt(k.value))),null!=f&&f.fileChanged());a.hideDialog()}}else{l=null!=f?f.isCompressed():Editor.compressXml;d=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");d.appendChild(c);var m=document.createElement("input");m.setAttribute("type","checkbox");l&&(m.setAttribute("checked","checked"),
+m.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(m);d.appendChild(c);g.appendChild(d);this.init=function(){m.focus()};c=function(){null!=a.fileNode&&(a.fileNode.setAttribute("compressed",m.checked?"true":"false"),null!=f&&f.fileChanged());a.hideDialog()}}l=mxUtils.button(mxResources.get("apply"),c);l.className="geBtn gePrimaryBtn";d=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";
+c.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&c.appendChild(n);c.appendChild(l);a.editor.cancelFirst||c.appendChild(n);d.appendChild(c);g.appendChild(d);b.appendChild(g);this.container=b};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"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"}},
@@ -9439,102 +9439,102 @@ Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/face
IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
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.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.compressXml=!0;Editor.globalVars=null;Editor.shadowOptionEnabled=!mxClient.IS_SF;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"comic",dispName:"Comic",
-type:"bool",defVal:!1,isVisible:function(a,d){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",
-type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",
-type:"float",defVal:0,min:0,max:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":
-"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",
-dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",
+type:"bool",defVal:!1,isVisible:function(a,e){return"1"!=mxUtils.getValue(a.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",
+type:"int",defVal:-1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",
+type:"float",defVal:0,min:0,max:1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":
+"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",
+dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(a,e){return"1"==mxUtils.getValue(a.style,"comic","0")||"1"==mxUtils.getValue(a.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(a,e){return"1"==mxUtils.getValue(a.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(a){return"orthogonalEdgeStyle"==mxUtils.getValue(a.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:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",
-type:"bool",getDefaultValue:function(a,d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,d){var b=d.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:
-null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,d){var b=d.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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:"fill",
+type:"bool",getDefaultValue:function(a,e){var b=e.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null);return"1"==mxUtils.getValue(b,"resizeLastRow","0")},isVisible:function(a,e){var b=e.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(a,e){var b=e.editorUi.editor.graph.getCellStyle(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:
+null);return"1"==mxUtils.getValue(b,"resizeLast","0")},isVisible:function(a,e){var b=e.editorUi.editor.graph;return 1==a.vertices.length&&0==a.edges.length&&b.isTable(a.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:"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(a,d){return d.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{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(a,e){return e.editorUi.editor.graph.isCellConnectable(1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null)},isVisible:function(a,e){return 1==a.vertices.length&&0==a.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"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",
-type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isContainer(b)&&"0"!=a.style.collapsible||
-!c.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&!d.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,d){var b=
-d.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,d){var b=0<a.vertices.length?d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,e){return 1==a.vertices.length&&0==a.edges.length}},{name:"dropTarget",dispName:"Drop Target",
+type:"bool",getDefaultValue:function(a,e){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=e.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,e){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,e){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=e.editorUi.editor.graph;return null!=b&&(c.isContainer(b)&&"0"!=a.style.collapsible||
+!c.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,e){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,e){return 1==a.vertices.length&&0==a.edges.length&&!e.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,e){var b=
+e.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.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(a,e){var b=0<a.vertices.length?e.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
-dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,d){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,e){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return e.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,e){return 0<a.vertices.length&&e.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.createRoughCanvas=function(a){var d=rough.canvas({getContext:function(){return a}});d.draw=function(d){var b=d.sets||[];d=d.options||this.getDefaultOptions();for(var c=0;c<b.length;c++){var e=b[c];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(a,e,d);break;case "fillPath":this._drawToContext(a,e,d);break;case "fillSketch":this.fillSketch(a,e,d)}}};d.fillSketch=function(d,b,c){var e=a.state.strokeColor,g=a.state.strokeWidth,m=a.state.strokeAlpha,f=a.state.dashed,n=c.fillWeight;
-0>n&&(n=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(n);a.setDashed(!1);this._drawToContext(d,b,c);a.setDashed(f);a.setStrokeWidth(g);a.setStrokeColor(e);a.setStrokeAlpha(m)};d._drawToContext=function(a,d,b){a.begin();for(var c=0;c<d.ops.length;c++){var e=d.ops[c],g=e.data;switch(e.op){case "move":a.moveTo(g[0],g[1]);break;case "bcurveTo":a.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":a.lineTo(g[0],g[1])}}a.end();"fillPath"===d.type&&
-b.filled?a.fill():a.stroke()};return d};(function(){function a(d,b,c){this.canvas=d;this.rc=b;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(a){var e=rough.canvas({getContext:function(){return a}});e.draw=function(e){var b=e.sets||[];e=e.options||this.getDefaultOptions();for(var c=0;c<b.length;c++){var d=b[c];switch(d.type){case "path":null!=e.stroke&&this._drawToContext(a,d,e);break;case "fillPath":this._drawToContext(a,d,e);break;case "fillSketch":this.fillSketch(a,d,e)}}};e.fillSketch=function(e,b,c){var d=a.state.strokeColor,k=a.state.strokeWidth,m=a.state.strokeAlpha,f=a.state.dashed,p=c.fillWeight;
+0>p&&(p=c.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(c.fill||"");a.setStrokeWidth(p);a.setDashed(!1);this._drawToContext(e,b,c);a.setDashed(f);a.setStrokeWidth(k);a.setStrokeColor(d);a.setStrokeAlpha(m)};e._drawToContext=function(a,e,b){a.begin();for(var c=0;c<e.ops.length;c++){var d=e.ops[c],k=d.data;switch(d.op){case "move":a.moveTo(k[0],k[1]);break;case "bcurveTo":a.curveTo(k[0],k[1],k[2],k[3],k[4],k[5]);break;case "lineTo":a.lineTo(k[0],k[1])}}a.end();"fillPath"===e.type&&
+b.filled?a.fill():a.stroke()};return e};(function(){function a(e,b,c){this.canvas=e;this.rc=b;this.shape=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}a.prototype.moveOp="M";a.prototype.lineOp="L";a.prototype.quadOp="Q";a.prototype.curveOp="C";a.prototype.closeOp="Z";a.prototype.getStyle=function(a,d){var b=1;if(null!=this.shape.state){var c=this.shape.state.cell.id;if(null!=c)for(var e=0;e<c.length;e++)b=(b<<5)-b+c.charCodeAt(e)<<0}b={strokeWidth:this.canvas.state.strokeWidth,seed:b};c=this.rc.getDefaultOptions();a?b.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:delete b.stroke;
-e=null;(b.filled=d)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,e="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):""==b.fill;b.bowing=mxUtils.getValue(this.shape.style,"bowing",c.bowing);b.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",c.hachureAngle);b.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",c.curveFitting);b.roughness=mxUtils.getValue(this.shape.style,"jiggle",c.roughness);b.simplification=mxUtils.getValue(this.shape.style,
-"simplification",c.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",c.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",c.disableMultiStrokeFill);var g=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==g?-1:g;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",g);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",g);b.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",
-g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=b.fill&&(null!=e||null!=g&&b.fill.toLowerCase()==g.toLowerCase())?"solid":c.fillStyle);b.fillStyle=g;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
-this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,d),this.lastX=a,this.lastY=d)};a.prototype.moveTo=
-function(a,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,d),this.lastX=a,this.lastY=d,this.firstX=a,this.firstY=d)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,d,b,c){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,d,b,c),this.lastX=b,this.lastY=c)};a.prototype.curveTo=function(a,d,b,c,e,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,d,b,c,e,g),this.lastX=e,this.lastY=g)};a.prototype.arcTo=function(a,d,b,c,e,g,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var f=mxUtils.arcToCurves(this.lastX,this.lastY,a,d,b,c,e,g,m);if(null!=f)for(var n=0;n<f.length;n+=6)this.curveTo(f[n],f[n+1],f[n+2],f[n+3],f[n+4],f[n+5]);this.lastX=g;this.lastY=m}};a.prototype.rect=function(a,d,b,c){this.passThrough?this.originalRect.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,d,b,c,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,d,b,c){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,d+c/2,b,c,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,d,b,c,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+e,d),this.lineTo(a+b-e,d),this.quadTo(a+b,d,a+b,d+g),this.lineTo(a+
-b,d+c-g),this.quadTo(a+b,d+c,a+b-e,d+c),this.lineTo(a+e,d+c),this.quadTo(a,d+c,a,d+c-g),this.lineTo(a,d+g),this.quadTo(a,d,a+e,d))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(J){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in a)this.nextShape.options[d]=a[d];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+this.path=[];this.passThrough=!1}a.prototype.moveOp="M";a.prototype.lineOp="L";a.prototype.quadOp="Q";a.prototype.curveOp="C";a.prototype.closeOp="Z";a.prototype.getStyle=function(a,e){var b=1;if(null!=this.shape.state){var c=this.shape.state.cell.id;if(null!=c)for(var d=0;d<c.length;d++)b=(b<<5)-b+c.charCodeAt(d)<<0}b={strokeWidth:this.canvas.state.strokeWidth,seed:b};c=this.rc.getDefaultOptions();a?b.stroke="none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:delete b.stroke;
+d=null;(b.filled=e)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,d="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):""==b.fill;b.bowing=mxUtils.getValue(this.shape.style,"bowing",c.bowing);b.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",c.hachureAngle);b.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",c.curveFitting);b.roughness=mxUtils.getValue(this.shape.style,"jiggle",c.roughness);b.simplification=mxUtils.getValue(this.shape.style,
+"simplification",c.simplification);b.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",c.disableMultiStroke);b.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",c.disableMultiStrokeFill);var k=mxUtils.getValue(this.shape.style,"hachureGap",-1);b.hachureGap="auto"==k?-1:k;b.dashGap=mxUtils.getValue(this.shape.style,"dashGap",k);b.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",k);b.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",
+k);k=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==k?-1:k;k=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==k&&(k=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",k=null!=b.fill&&(null!=d||null!=k&&b.fill.toLowerCase()==k.toLowerCase())?"solid":c.fillStyle);b.fillStyle=k;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
+this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,e){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,e),this.lastX=a,this.lastY=e)};a.prototype.moveTo=
+function(a,e){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,e),this.lastX=a,this.lastY=e,this.firstX=a,this.firstY=e)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,e,b,c){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,e,b,c),this.lastX=b,this.lastY=c)};a.prototype.curveTo=function(a,e,b,c,d,k){this.passThrough?
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,e,b,c,d,k),this.lastX=d,this.lastY=k)};a.prototype.arcTo=function(a,e,b,c,d,k,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var f=mxUtils.arcToCurves(this.lastX,this.lastY,a,e,b,c,d,k,m);if(null!=f)for(var p=0;p<f.length;p+=6)this.curveTo(f[p],f[p+1],f[p+2],f[p+3],f[p+4],f[p+5]);this.lastX=k;this.lastY=m}};a.prototype.rect=function(a,e,b,c){this.passThrough?this.originalRect.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,e,b,c,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,e,b,c){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,e+c/2,b,c,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,e,b,c,d,k){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,e),this.lineTo(a+b-d,e),this.quadTo(a+b,e,a+b,e+k),this.lineTo(a+
+b,e+c-k),this.quadTo(a+b,e+c,a+b-d,e+c),this.lineTo(a+d,e+c),this.quadTo(a,e+c,a,e+c-k),this.lineTo(a,e+k),this.quadTo(a,e,a+d,e))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(L){}this.passThrough=!1}else if(null!=this.nextShape){for(var e in a)this.nextShape.options[e]=a[e];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
-this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new a(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var c=null,e=!0;if(null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"),c=mxUtils.getValue(this.style,"fillStyle","auto"),null!=this.state&&"auto"==c)){var g=this.state.view.graph.defaultPageBackgroundColor;null!=this.fill&&(null!=this.gradient||null!=g&&this.fill.toLowerCase()==g.toLowerCase())&&(c="solid")}!e||null==d.handJiggle||d.handJiggle.constructor!=a||this.outline||null!=this.fill&&this.fill!=mxConstants.NONE&&"solid"==
-c||(d.save(),c=this.fill,e=this.stroke,this.stroke=this.fill=null,d.handJiggle.passThrough=!0,b.apply(this,arguments),d.handJiggle.passThrough=!1,this.fill=c,this.stroke=e,d.restore());b.apply(this,arguments)}})();Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,d,b){if(null!=
-a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),e=[];if(null!=c&&0<c.length)for(var g=0;g<c.length;g++)if("mxgraph"==c[g].getAttribute("class")){e.push(c[g]);break}0<e.length&&(c=e[0].getAttribute("data-mxgraph"),null!=c?(e=JSON.parse(c),null!=e&&null!=e.xml&&(a=mxUtils.parseXml(e.xml),a=a.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(c=mxUtils.getTextContent(e[0]),c=Graph.decompress(c,null,b),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=
-a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||d||(e=null,"diagram"==a.nodeName?e=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(e=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=
-e&&(a=Editor.parseDiagramNode(e,b)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,d){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<b.length?(b=Graph.decompress(b,null,d),null!=b&&0<b.length&&(c=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(b[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var d=mxUtils.getTextContent(a),
-b=null;0<d.length?b=Graph.decompress(d):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,e=0,g=[],m=null;e<a.length;){var f=a.charCodeAt(e),e=e+1;10!=f&&(b+=String.fromCharCode(f));f=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(n>e){d=a.substring(e,n);break}}10==f&&("endobj"==
-b?m=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(m=[],g[b.split(" ")[0]]=m):null!=m&&m.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(g));null!=d&&(d=decodeURIComponent(d.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return d};Editor.extractGraphModelFromXref=function(a){var d=a.trailer,b=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(d=a[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&
-(a=a[d[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var d=null;try{var b=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,e){a=c.substring(a+8,a+8+e);"zTXt"==b?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=pako.inflateRaw(a.substring(e+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(d=a))):"tEXt"==b&&
-(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(d=a[1]));if(null!=d||"IDAT"==b)return!0}))}catch(O){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(a,d){var b=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(b=d||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0])));
-return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,d){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=d)}};Editor.configure=function(a,d){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=
+this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(e){return new a(e,Editor.createRoughCanvas(e),this)};var e=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?e.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
+mxShape.prototype.paint=function(e){var c=null,d=!0;if(null!=this.style&&(d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"),c=mxUtils.getValue(this.style,"fillStyle","auto"),null!=this.state&&"auto"==c)){var k=this.state.view.graph.defaultPageBackgroundColor;null!=this.fill&&(null!=this.gradient||null!=k&&this.fill.toLowerCase()==k.toLowerCase())&&(c="solid")}!d||null==e.handJiggle||e.handJiggle.constructor!=a||this.outline||null!=this.fill&&this.fill!=mxConstants.NONE&&"solid"==
+c||(e.save(),c=this.fill,d=this.stroke,this.stroke=this.fill=null,e.handJiggle.passThrough=!0,b.apply(this,arguments),e.handJiggle.passThrough=!1,this.fill=c,this.stroke=d,e.restore());b.apply(this,arguments)}})();Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,e,b){if(null!=
+a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var k=0;k<c.length;k++)if("mxgraph"==c[k].getAttribute("class")){d.push(c[k]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=Graph.decompress(c,null,b),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=
+a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||e||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=
+d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||e&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,e){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;0<b.length?(b=Graph.decompress(b,null,e),null!=b&&0<b.length&&(c=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(b[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var e=mxUtils.getTextContent(a),
+b=null;0<e.length?b=Graph.decompress(e):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var e=null,b="",c=0,d=0,k=[],m=null;d<a.length;){var f=a.charCodeAt(d),d=d+1;10!=f&&(b+=String.fromCharCode(f));f=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var p=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(p>d){e=a.substring(d,p);break}}10==f&&("endobj"==
+b?m=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(m=[],k[b.split(" ")[0]]=m):null!=m&&m.push(b),b="")}null==e&&(e=Editor.extractGraphModelFromXref(k));null!=e&&(e=decodeURIComponent(e.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return e};Editor.extractGraphModelFromXref=function(a){var e=a.trailer,b=null;null!=e&&(e=/.* \/Info (\d+) (\d+) R/g.exec(e.join("\n")),null!=e&&0<e.length&&(e=a[e[1]],null!=e&&(e=/.* \/Subject (\d+) (\d+) R/g.exec(e.join("\n")),null!=e&&0<e.length&&
+(a=a[e[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var e=null;try{var b=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,d){a=c.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(e=a))):"tEXt"==b&&
+(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(e=a[1]));if(null!=e||"IDAT"==b)return!0}))}catch(N){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};Editor.extractParserError=function(a,e){var b=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(b=e||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0])));
+return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,e){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=e)}};Editor.configure=function(a,e){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=
a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=
a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var c=document.getElementsByTagName("script")[0];
c.parentNode.insertBefore(b,c)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);
null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=a.autosaveDelay&&(b=parseInt(a.autosaveDelay),
-!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!d)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b]);null!=a.maxImageBytes&&(EditorUi.prototype.maxImageBytes=a.maxImageBytes);null!=a.maxImageSize&&(EditorUi.prototype.maxImageSize=a.maxImageSize)}};Editor.configureFontCss=function(a){if(null!=a){Editor.prototype.fontCss=a;var d=document.getElementsByTagName("script")[0];if(null!=d&&null!=
-d.parentNode){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a));d.parentNode.insertBefore(b,d);a=a.split("url(");for(b=1;b<a.length;b++){var c=a[b].indexOf(")"),c=Editor.trimCssUrl(a[b].substring(0,c)),e=document.createElement("link");e.setAttribute("rel","preload");e.setAttribute("href",c);e.setAttribute("as","font");e.setAttribute("crossorigin","");d.parentNode.insertBefore(e,d)}}}};Editor.trimCssUrl=function(a){return a.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(a){a=null!=a?a:Editor.GUID_LENGTH;for(var d=[],b=0;b<a;b++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!mxClient.IS_SF;Editor.prototype.editButtonLink=
-null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==d.nodeName){b=d.getAttribute("style")||
-"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(e=new mxCodec(c.ownerDocument),e.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var e=new mxCodec(c.ownerDocument);e.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=
-b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
-d.getAttribute("shadow"),!1);if(b=d.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<b.length;c++)this.graph.addExtFont(b[c].name,b[c].url)}catch(O){console.log("ExtFonts format error: "+O.message)}}a.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(a){a=null!=a?a:!0;var d=e.apply(this,
-arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var b=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});d.setAttribute("extFonts",
-b.join("|"))}return d};Editor.prototype.isDataSvg=function(a){try{var d=mxUtils.parseXml(a).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 b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(a,d,b){return Editor.extractGraphModel.apply(this,
+!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!e)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b]);null!=a.maxImageBytes&&(EditorUi.prototype.maxImageBytes=a.maxImageBytes);null!=a.maxImageSize&&(EditorUi.prototype.maxImageSize=a.maxImageSize)}};Editor.configureFontCss=function(a){if(null!=a){Editor.prototype.fontCss=a;var e=document.getElementsByTagName("script")[0];if(null!=e&&null!=
+e.parentNode){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a));e.parentNode.insertBefore(b,e);a=a.split("url(");for(b=1;b<a.length;b++){var c=a[b].indexOf(")"),c=Editor.trimCssUrl(a[b].substring(0,c)),d=document.createElement("link");d.setAttribute("rel","preload");d.setAttribute("href",c);d.setAttribute("as","font");d.setAttribute("crossorigin","");e.parentNode.insertBefore(d,e)}}}};Editor.trimCssUrl=function(a){return a.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(a){a=null!=a?a:Editor.GUID_LENGTH;for(var e=[],b=0;b<a;b++)e.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return e.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!mxClient.IS_SF;Editor.prototype.editButtonLink=
+null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(e){e=null!=e&&"mxlibrary"!=e.nodeName?this.extractGraphModel(e):null;if(null!=e){var b=e.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==e.nodeName){b=e.getAttribute("style")||
+"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=
+b;this.graph.mathEnabled="1"==urlParams.math||"1"==e.getAttribute("math");b=e.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
+e.getAttribute("shadow"),!1);if(b=e.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<b.length;c++)this.graph.addExtFont(b[c].name,b[c].url)}catch(N){console.log("ExtFonts format error: "+N.message)}}a.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(a){a=null!=a?a:!0;var e=d.apply(this,
+arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&e.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&e.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));e.setAttribute("math",this.graph.mathEnabled?"1":"0");e.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var b=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});e.setAttribute("extFonts",
+b.join("|"))}return e};Editor.prototype.isDataSvg=function(a){try{var e=mxUtils.parseXml(a).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 b=mxUtils.parseXml(e).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=function(a,e,b){return Editor.extractGraphModel.apply(this,
arguments)};var c=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();c.apply(this,arguments)};var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,d){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
-MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";d=null!=d?d:{jax:["input/TeX","input/MathML","input/AsciiMath"].concat(["html"==urlParams["math-output"]?"output/HTML-CSS":"output/SVG"]),extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},"HTML-CSS":{availableFonts:[b],imageFont:null},SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
-window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d);MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=
-function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};b=document.getElementsByTagName("script");if(null!=b&&0<b.length){var e=document.createElement("script");e.type="text/javascript";e.src=a;b[0].parentNode.appendChild(e)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
-var d=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,e){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==e&&d.push(e);return""});/,\s*$/.test(a)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var d=a.convert,b=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=Editor.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,
-19)||mxClient.IS_CHROMEAPP||(c=d.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,d){try{var b=!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);b&&d(Editor.createSvgDataUri(a.getText()))}),
-function(){window.clearTimeout(c);b&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(b)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);d(a.toDataURL())}catch(W){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);b&&d(Editor.svgBrokenImage.src)};e.src=a}}catch(J){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,d,b,c){null==c&&(c=this.createImageUrlConverter());var e=0,g=b||{};b=mxUtils.bind(this,function(b,m){for(var f=a.getElementsByTagName(b),n=0;n<f.length;n++)mxUtils.bind(this,function(b){try{if(null!=b){var f=c.convert(b.getAttribute(m));if(null!=f&&"data:"!=f.substring(0,5)){var n=g[f];null==n?(e++,this.convertImageToDataUri(f,function(c){null!=c&&(g[f]=c,b.setAttribute(m,c));e--;0==e&&d(a)})):b.setAttribute(m,n)}else null!=f&&b.setAttribute(m,f)}}catch(Z){}})(f[n])});b("image","xlink:href");
-b("img","src");0==e&&d(a)};Editor.base64Encode=function(a){for(var d="",b=0,c=a.length,e,g,m;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&
-3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}m=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(m&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return d};
-Editor.prototype.loadUrl=function(a,d,b,c,e,g,m,f){try{var n=!m&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=d){var c=a.getText();if(n){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var c=Array(a.length),e=0;e<a.length;e++)c[e]=String.fromCharCode(a[e]);c=c.join("")}g=null!=g?g:"data:image/png;base64,";c=g+Editor.base64Encode(c)}d(c)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},n,this.timeout,function(){e&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:p})},f)});p()}catch(Y){null!=b&&b(Y)}};Editor.prototype.absoluteCssFonts=
-function(a){var d=null;if(null!=a){var b=a.split("url(");if(0<b.length){d=[b[0]];a=window.location.pathname;var c=null!=a?a.lastIndexOf("/"):-1;0<=c&&(a=a.substring(0,c+1));var c=document.getElementsByTagName("base"),e=null;null!=c&&0<c.length&&(e=c[0].getAttribute("href"));for(var g=1;g<b.length;g++)if(c=b[g].indexOf(")"),0<c){var m=Editor.trimCssUrl(b[g].substring(0,c));this.graph.isRelativeUrl(m)&&(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":a)+m);
-d.push('url("'+m+'"'+b[g].substring(c))}else d.push(b[g])}else d=[a]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(a,d){var b=a.split("url("),c=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==c){for(var a=[b[0]],e=1;e<b.length;e++){var g=b[e].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[e].substring(0,g))]);a.push('"'+b[e].substring(g))}d(a.join(""))}});if(0<b.length){for(var g=1;g<b.length;g++){var m=b[g].indexOf(")"),
-f=null,n=b[g].indexOf("format(",m);0<n&&(f=Editor.trimCssUrl(b[g].substring(n+7,b[g].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;var d="application/x-font-ttf";if("svg"==f||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==f||"embedded-opentype"==f||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==f||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==f||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";
-else if("eot"==f||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==f||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[g].substring(0,m)),f)}e()}else d(a)};Editor.prototype.loadFonts=
-function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;a()})):a()};Editor.prototype.embedExtFonts=function(a){var d=this.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),g=0;g<d.length;g++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?
-(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[g].name,d[g].url);e()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&&a[0].appendChild(d[b].cloneNode(!0))};
-Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,d);b.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,d,b,c,e,g,m,f,n,p,k,l,t,z,u,q){try{g=null!=g?g:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;t=null!=t?t:0;var v=n?null:l.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=q?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(l.getSvg(null,null,t,z,null,m,null,null,null,p,null,q),mxUtils.bind(this,function(b){try{var c=new Image;
-c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){z.drawImage(c,0,0);a(n)},0):(z.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),k=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=d&&(f=g?Math.min(1,Math.min(3*d/(4*k),d/p)):d/p);p=Math.ceil(f*p);k=Math.ceil(f*k);n.setAttribute("width",p);n.setAttribute("height",k);var z=n.getContext("2d");null!=v&&(z.beginPath(),z.rect(0,0,p,k),z.fillStyle=v,
-z.fill());z.scale(f,f);if(u){var q=l.view,B=q.scale;q.scale=1;var x=btoa(unescape(encodeURIComponent(q.createSvgGrid(q.gridColor))));q.scale=B;var x="data:image/svg+xml;base64,"+x,C=l.gridSize*q.gridSteps*f,I=l.getGraphBounds(),G=q.translate.x*B,y=q.translate.y*B,D=G+(I.x-G)/B-t,K=y+(I.y-y)/B-t,A=new Image;A.onload=function(){try{for(var a=-Math.round(C-mxUtils.mod((G-D)*f,C)),d=-Math.round(C-mxUtils.mod((y-K)*f,C));a<p;a+=C)for(var b=d;b<k;b+=C)z.drawImage(A,a/f,b/f);m()}catch(na){null!=e&&e(na)}};
-A.onerror=function(a){null!=e&&e(a)};A.src=x}else m()}catch(la){null!=e&&e(la)}});c.onerror=function(a){null!=e&&e(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(R){null!=e&&e(R)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(X){null!=e&&e(X)}}))}catch(R){null!=
-e&&e(R)}}),b,k)}catch(Q){null!=e&&e(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var f=k,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[k]=f;Editor.updateCRC=function(a,d,b,c){for(var e=0;e<c;e++)a=Editor.crcTable[(a^d.charCodeAt(b+e))&255]^a>>>8;return a};Editor.crc32=function(a){for(var d=-1,b=0;b<a.length;b++)d=d>>>8^Editor.crcTable[(d^a.charCodeAt(b))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(a,d,b,c,e){function g(a,d){var b=n;n+=d;return a.substring(b,n)}
-function m(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,n);do{var p=m(a);if("IDAT"==g(a,4)){e=a.substring(0,n-8);"pHYs"==d&&"dpi"==
-b?(b=Math.round(c/.0254),b=f(b)+f(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,d,0,4);c=Editor.updateCRC(c,b,0,b.length);e+=f(b.length)+d+b+f(c^4294967295);e+=a.substring(n-8,a.length);break}e+=a.substring(n-8,n-4+p);g(a,p);g(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
-var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&
-(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=
-!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var t=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=t.apply(this,arguments);var d=this.editorUi,
-b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});a.appendChild(e)}}if(this.isMathOptionVisible()&&
-b.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";a.appendChild(e);var g=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
-g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,e){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
+MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";e=null!=e?e:{jax:["input/TeX","input/MathML","input/AsciiMath"].concat(["html"==urlParams["math-output"]?"output/HTML-CSS":"output/SVG"]),extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},"HTML-CSS":{availableFonts:[b],imageFont:null},SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
+window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(e);MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=
+function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,e){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};b=document.getElementsByTagName("script");if(null!=b&&0<b.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;b[0].parentNode.appendChild(d)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
+var e=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,d){void 0!==b?e.push(b.replace(/\\'/g,"'")):void 0!==c?e.push(c.replace(/\\"/g,'"')):void 0!==d&&e.push(d);return""});/,\s*$/.test(a)&&e.push("");return e};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var e=a.convert,b=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=Editor.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,
+19)||mxClient.IS_CHROMEAPP||(c=e.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,e){try{var b=!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;e(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);b&&e(Editor.createSvgDataUri(a.getText()))}),
+function(){window.clearTimeout(c);b&&e(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(c);if(b)try{var a=document.createElement("canvas"),k=a.getContext("2d");a.height=d.height;a.width=d.width;k.drawImage(d,0,0);e(a.toDataURL())}catch(R){e(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(c);b&&e(Editor.svgBrokenImage.src)};d.src=a}}catch(L){e(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(a,e,b,c){null==c&&(c=this.createImageUrlConverter());var d=0,k=b||{};b=mxUtils.bind(this,function(b,m){for(var f=a.getElementsByTagName(b),p=0;p<f.length;p++)mxUtils.bind(this,function(b){try{if(null!=b){var f=c.convert(b.getAttribute(m));if(null!=f&&"data:"!=f.substring(0,5)){var p=k[f];null==p?(d++,this.convertImageToDataUri(f,function(c){null!=c&&(k[f]=c,b.setAttribute(m,c));d--;0==d&&e(a)})):b.setAttribute(m,p)}else null!=f&&b.setAttribute(m,f)}}catch(V){}})(f[p])});b("image","xlink:href");
+b("img","src");0==d&&e(a)};Editor.base64Encode=function(a){for(var e="",b=0,c=a.length,d,k,m;b<c;){d=a.charCodeAt(b++)&255;if(b==c){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);e+="==";break}k=a.charCodeAt(b++);if(b==c){e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
+3)<<4|(k&240)>>4);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);e+="=";break}m=a.charCodeAt(b++);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(k&240)>>4);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2|(m&192)>>6);e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return e};
+Editor.prototype.loadUrl=function(a,e,b,c,d,k,m,f){try{var p=!m&&(c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){var c=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}k=null!=k?k:"data:image/png;base64,";c=k+Editor.base64Encode(c)}e(c)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},p,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:g})},f)});g()}catch(aa){null!=b&&b(aa)}};Editor.prototype.absoluteCssFonts=
+function(a){var e=null;if(null!=a){var b=a.split("url(");if(0<b.length){e=[b[0]];a=window.location.pathname;var c=null!=a?a.lastIndexOf("/"):-1;0<=c&&(a=a.substring(0,c+1));var c=document.getElementsByTagName("base"),d=null;null!=c&&0<c.length&&(d=c[0].getAttribute("href"));for(var k=1;k<b.length;k++)if(c=b[k].indexOf(")"),0<c){var m=Editor.trimCssUrl(b[k].substring(0,c));this.graph.isRelativeUrl(m)&&(m=null!=d?d+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":a)+m);
+e.push('url("'+m+'"'+b[k].substring(c))}else e.push(b[k])}else e=[a]}return null!=e?e.join(""):null};Editor.prototype.embedCssFonts=function(a,e){var b=a.split("url("),c=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==c){for(var a=[b[0]],d=1;d<b.length;d++){var k=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,k))]);a.push('"'+b[d].substring(k))}e(a.join(""))}});if(0<b.length){for(var k=1;k<b.length;k++){var m=b[k].indexOf(")"),
+f=null,p=b[k].indexOf("format(",m);0<p&&(f=Editor.trimCssUrl(b[k].substring(p+7,b[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;c++;var e="application/x-font-ttf";if("svg"==f||/(\.svg)($|\?)/i.test(a))e="image/svg+xml";else if("otf"==f||"embedded-opentype"==f||/(\.otf)($|\?)/i.test(a))e="application/x-font-opentype";else if("woff"==f||/(\.woff)($|\?)/i.test(a))e="application/font-woff";else if("woff2"==f||/(\.woff2)($|\?)/i.test(a))e="application/font-woff2";
+else if("eot"==f||/(\.eot)($|\?)/i.test(a))e="application/vnd.ms-fontobject";else if("sfnt"==f||/(\.sfnt)($|\?)/i.test(a))e="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(e){this.cachedFonts[a]=e;c--;d()}),mxUtils.bind(this,function(a){c--;d()}),!0,null,"data:"+e+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[k].substring(0,m)),f)}d()}else e(a)};Editor.prototype.loadFonts=
+function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(e){this.resolvedFontCss=e;a()})):a()};Editor.prototype.embedExtFonts=function(a){var e=this.graph.extFonts;if(null!=e&&0<e.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),k=0;k<e.length;k++)mxUtils.bind(this,function(a,e){0==e.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[e]?
+(c++,this.loadUrl(e,mxUtils.bind(this,function(a){this.cachedGoogleFonts[e]=a;b+=a;c--;d()}),mxUtils.bind(this,function(a){c--;b+="@import url("+e+");";d()}))):b+=this.cachedGoogleFonts[e]:b+='@font-face {font-family: "'+a+'";src: url("'+e+'");}'})(e[k].name,e[k].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var e=document.getElementsByTagName("style"),b=0;b<e.length;b++)0<mxUtils.getTextContent(e[b]).indexOf("MathJax")&&a[0].appendChild(e[b].cloneNode(!0))};
+Editor.prototype.addFontCss=function(a,e){e=null!=e?e:this.absoluteCssFonts(this.fontCss);if(null!=e){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,e);b.appendChild(c)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,e,b,c,d,k,m,f,p,g,q,l,u,n,v,t){try{k=null!=k?k:!0;m=null!=m?m:!0;l=null!=l?l:this.graph;u=null!=u?u:0;var B=p?null:l.background;B==mxConstants.NONE&&(B=null);null==B&&(B=c);null==B&&0==p&&(B=t?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(l.getSvg(null,null,u,n,null,m,null,null,null,g,null,t),mxUtils.bind(this,function(b){try{var c=new Image;
+c.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){n.drawImage(c,0,0);a(p)},0):(n.drawImage(c,0,0),a(p))},p=document.createElement("canvas"),g=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));f=null!=f?f:1;null!=e&&(f=k?Math.min(1,Math.min(3*e/(4*q),e/g)):e/g);g=Math.ceil(f*g);q=Math.ceil(f*q);p.setAttribute("width",g);p.setAttribute("height",q);var n=p.getContext("2d");null!=B&&(n.beginPath(),n.rect(0,0,g,q),n.fillStyle=B,
+n.fill());n.scale(f,f);if(v){var t=l.view,z=t.scale;t.scale=1;var C=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=z;var C="data:image/svg+xml;base64,"+C,x=l.gridSize*t.gridSteps*f,J=l.getGraphBounds(),G=t.translate.x*z,y=t.translate.y*z,D=G+(J.x-G)/z-u,I=y+(J.y-y)/z-u,A=new Image;A.onload=function(){try{for(var a=-Math.round(x-mxUtils.mod((G-D)*f,x)),e=-Math.round(x-mxUtils.mod((y-I)*f,x));a<g;a+=x)for(var b=e;b<q;b+=x)n.drawImage(A,a/f,b/f);m()}catch(wa){null!=d&&d(wa)}};
+A.onerror=function(a){null!=d&&d(a)};A.src=C}else m()}catch(ra){null!=d&&d(ra)}});c.onerror=function(a){null!=d&&d(a)};g&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(X){null!=d&&d(X)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(m)}catch(S){null!=d&&d(S)}}))}catch(X){null!=
+d&&d(X)}}),b,q)}catch(W){null!=d&&d(W)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var f=g,l=0;8>l;l++)f=1==(f&1)?3988292384^f>>>1:f>>>1,Editor.crcTable[g]=f;Editor.updateCRC=function(a,e,b,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^e.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var e=-1,b=0;b<a.length;b++)e=e>>>8^Editor.crcTable[(e^a.charCodeAt(b))&255];return(e^-1)>>>0};Editor.writeGraphModelToPng=function(a,e,b,c,d){function k(a,e){var b=p;p+=e;return a.substring(b,p)}
+function m(a){a=k(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(k(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(k(a,4),"IHDR"!=k(a,4))null!=d&&d();else{k(a,17);d=a.substring(0,p);do{var g=m(a);if("IDAT"==k(a,4)){d=a.substring(0,p-8);"pHYs"==e&&"dpi"==
+b?(b=Math.round(c/.0254),b=f(b)+f(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==e?String.fromCharCode(0):"")+c;c=4294967295;c=Editor.updateCRC(c,e,0,4);c=Editor.updateCRC(c,b,0,b.length);d+=f(b.length)+e+b+f(c^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+g);k(a,g);k(a,4)}while(g);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+var n=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,e){n.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,e){var b=null;null!=a.editor.graph.getModel().getParent(e)?b=e.getId():null!=a.currentPage&&
+(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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 a=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var e=this.editorUi,b=e.editor.graph,c=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(e);c.ignoreColor=!0;c.ignoreImage=
+!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};e.addListener("shadowVisibleChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=q.apply(this,arguments);var e=this.editorUi,
+b=e.editor.graph;if(b.isEnabled()){var c=e.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return e.editor.autosave},function(a){e.editor.setAutosave(a);e.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(e.editor.autosave)};e.editor.addListener("autosaveChanged",this.listener)},destroy:function(){e.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
+b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){e.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};e.addListener("mathEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var k=e.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";d.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
@@ -9555,66 +9555,66 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
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:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
-gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,d,b){if(null!=d){var c=function(a){if(null!=a)if(b)for(var c=
-0;c<a.length;c++)d[a[c].name]=a[c];else for(var e in d){for(var g=!1,c=0;c<a.length;c++)if(a[c].name==e&&a[c].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(a);null!=e&&null!=e.shape&&(e.shape.commonCustomPropAdded||(e.shape.commonCustomPropAdded=!0,e.shape.customProperties=e.shape.customProperties||[],e.cell.vertex?Array.prototype.push.apply(e.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(e.shape.customProperties,Editor.commonEdgeProperties)),
-c(e.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(J){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},b=a.vertices,c=a.edges,e=0;e<b.length;e++)this.findCommonProperties(b[e],d,0==e);for(e=0;e<c.length;e++)this.findCommonProperties(c[e],
-d,0==b.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,a))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
-d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
-function(a,d,b){function c(a,d,b,c){l.getModel().beginUpdate();try{var e=[],g=[];if(null!=b.index){for(var m=[],f=b.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)m.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<m.length?null!=c?m.splice(c,1):m[b.index]=d:m.push(d);null!=b.size&&m.length>b.size&&(m=m.slice(0,b.size));d=m.join(",");null!=b.countProperty&&(l.setCellStyles(b.countProperty,m.length,l.getSelectionCells()),e.push(b.countProperty),g.push(m.length))}l.setCellStyles(a,
-d,l.getSelectionCells());e.push(a);g.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>d)p=p.slice(0,d);else for(var t=p.length;t<d;t++)p.push(n);p=p.join(",");l.setCellStyles(b.dependentProps[a],p,l.getSelectionCells());e.push(b.dependentProps[a]);g.push(p)}if("function"==typeof b.onChange)b.onChange(l,d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}
-function e(d,b,c){var e=mxUtils.getOffset(a,!0),g=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=g.x-e.x+"px";b.style.top=g.y-e.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function g(a,d,b){var e=document.createElement("div");e.style.width="32px";e.style.height="4px";e.style.margin="2px";e.style.border="1px solid black";e.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,
-function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(a,d,b,e,g,m,f){null!=d&&(d=d.split(","),t.push({name:a,values:d,type:b,defVal:e,countProperty:g,parentRow:m,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=m,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
-a)n=n.nextSibling,k++;else break;var l={type:b,parentRow:m,index:k,isDeletable:!0,defVal:e,countProperty:g},k=p(a,"",l,0==k%2,f);c(a,e,l);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,d,b,c,e,g,m){if(0<e){var f=Array(e);d=null!=d?d.split(","):[];for(var n=0;n<e;n++)f[n]=null!=d[n]?d[n]:null!=c?c:"";t.push({name:a,values:f,type:b,defVal:c,parentRow:g,flipBkg:m,size:e})}return document.createElement("div")}
-function n(a,d,b){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){c(a,e.checked?"1":"0",b)});return e}function p(d,b,p,l,t){var z=p.dispName,q=p.type,u=document.createElement("tr");u.className="gePropRow"+(t?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",d);u.setAttribute("data-pValue",b);l=!1;null!=p.index&&(u.setAttribute("data-index",p.index),z=(null!=z?z:"")+"["+p.index+"]",l=!0);var v=document.createElement("td");
-v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));l&&(v.style.textAlign="right");u.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==q)v.appendChild(g(d,b,p));else if("bool"==q||"boolean"==q)v.appendChild(n(d,b,p));else if("enum"==q){var B=p.enumList;for(t=0;t<B.length;t++)if(z=B[t],z.val==b){v.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(k,function(){var g=
-document.createElement("select");e(v,g);for(var m=0;m<B.length;m++){var f=B[m],n=document.createElement("option");n.value=mxUtils.htmlEntities(f.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));g.appendChild(n)}g.value=b;a.appendChild(g);mxEvent.addListener(g,"change",function(){var a=mxUtils.htmlEntities(g.value);c(d,a,p)});g.focus();mxEvent.addListener(g,"blur",function(){a.removeChild(g)})}))}else"dynamicArr"==q?v.appendChild(m(d,b,p.subType,p.subDefVal,p.countProperty,
-u,t)):"staticArr"==q?v.appendChild(f(d,b,p.subType,p.subDefVal,p.size,u,t)):(v.innerHTML=b,mxEvent.addListener(v,"click",mxUtils.bind(k,function(){function g(){var a=m.value,a=0==a.length&&"string"!=q?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",q="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==q?parseInt(a):a)+"");c(d,a,p)}var m=document.createElement("input");e(v,m,!0);m.value=b;m.className=
-"gePropEditor";"int"!=q&&"float"!=q||p.allowAuto||(m.type="number",m.step="int"==q?"1":"any",null!=p.min&&(m.min=parseFloat(p.min)),null!=p.max&&(m.max=parseFloat(p.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&g()});m.focus();mxEvent.addListener(m,"blur",function(){g()})})));p.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",
-v.appendChild(t));u.appendChild(v);return u}var k=this,l=this.editorUi.editor.graph,t=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.className="geProperties";z.style.whiteSpace="nowrap";z.style.width="100%";var q=document.createElement("tr");q.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;u.appendChild(v);mxUtils.write(u,mxResources.get("property"));
-q.style.cursor="pointer";var B=function(){var d=z.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var e=a.childNodes[c],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||a.removeChild(e)}catch(ma){}}else v.src=Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(q,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;
-B()});q.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");q.appendChild(u);z.appendChild(q);var x=!1,C=!1,y;for(y in d)if(q=d[y],"function"!=typeof q.isVisible||q.isVisible(b,this)){var I=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=q.getDefaultValue?q.getDefaultValue(b,this):q.defVal;if("separator"==q.type)C=!C;else{if("staticArr"==q.type)q.size=parseInt(b.style[q.sizeProperty]||d[q.sizeProperty].defVal)||0;else if(null!=
-q.dependentProps){for(var G=q.dependentProps,D=[],A=[],u=0;u<G.length;u++){var K=b.style[G[u]];A.push(d[G[u]].subDefVal);D.push(null!=K?K.split(","):[])}q.dependentPropsDefVal=A;q.dependentPropsVals=D}z.appendChild(p(y,I,q,x,C));x=!x}}for(u=0;u<t.length;u++)for(q=t[u],d=q.parentRow,b=0;b<q.values.length;b++)y=p(q.name,q.values[b],{type:q.type,parentRow:q.parentRow,isDeletable:q.isDeletable,index:b,defVal:q.defVal,countProperty:q.countProperty,size:q.size},0==b%2,q.flipBkg),d.parentNode.insertBefore(y,
-d.nextSibling),d=y;a.appendChild(z);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,c=b.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);
-var g="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var f=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
-"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){k(a)}))})(n);f.push(p);m.appendChild(p)}var k=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;l(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background=
-"#84d7ff"}),l=mxUtils.bind(this,function(a){var d=mxUtils.bind(this,function(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{for(var e=c.getSelectionCells(),m=0;m<e.length;m++){for(var f=c.getModel().getStyle(e[m]),n=0;n<g.length;n++)f=mxUtils.removeStylename(f,g[n]);var p=c.getModel().isVertex(e[m])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
-null)),mxEvent.isAltDown(d)||(f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!c.getModel().isVertex(e[m])||
-(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(e[m])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,
-mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[m],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage=
-"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),d.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(b.initialDefaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var m=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=m;d.style.border="1px solid "+f}e.appendChild(d)});e.innerHTML="";for(var m=0;m<a.length;m++)0<m&&0==mxUtils.mod(m,
-4)&&mxUtils.br(e),d(a[m])});null==this.format.currentScheme?k("dark"==uiTheme?1:0):k(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,t=document.createElement("div");t.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"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(t,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var z=document.createElement("div");z.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"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&&(a.appendChild(t),a.appendChild(z));mxEvent.addListener(z,"click",mxUtils.bind(this,function(){k(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(t);d(z);l(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(m);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var c=this.editorUi.editor.graph,e=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
-d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft=
-"2px"),a.appendChild(d));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var v=Graph.prototype.init;
-Graph.prototype.init=function(){function a(a){d=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=document.createEventObject(a),d.type=a.type,d.canBubble=a.canBubble,d.cancelable=a.cancelable,d.view=a.view,d.detail=a.detail,d.screenX=a.screenX,d.screenY=a.screenY,d.clientX=a.clientX,d.clientY=a.clientY,d.ctrlKey=a.ctrlKey,d.altKey=a.altKey,d.shiftKey=a.shiftKey,d.metaKey=a.metaKey,d.button=a.button,d.relatedTarget=a.relatedTarget}catch(J){}}v.apply(this,arguments);
-window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);
-if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||
-2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,
-"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=y.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);
-return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,e,g,m,f,n,p,k,l){var t=null;l||null==this.themes||"darkTheme"!=this.defaultThemeName||(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var z=A.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var q=z.ownerDocument,u=null!=q.createElementNS?q.createElementNS(mxConstants.NS_SVG,"style"):q.createElement("style");null!=q.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var v="",B="",x=0;x<this.extFonts.length;x++){var C=this.extFonts[x].name,y=this.extFonts[x].url;0==y.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+y+");\n":B+='@font-face {\nfont-family: "'+
-C+'";\nsrc: url("'+y+'");\n}\n'}u.appendChild(q.createTextNode(v+B));z.getElementsByTagName("defs")[0].appendChild(u)}null!=t&&(this.stylesheet=t,this.refresh());return z};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
-mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var e=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=c.innerHTML&&(e=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=e)}}else d.apply(this,arguments)}}return a};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){B.apply(this,
+gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,e,b){if(null!=e){var c=function(a){if(null!=a)if(b)for(var c=
+0;c<a.length;c++)e[a[c].name]=a[c];else for(var d in e){for(var k=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==e[d].type){k=!0;break}k||delete e[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
+c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(L){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var e={},b=a.vertices,c=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],e,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
+e,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(e).length&&this.container.appendChild(this.addProperties(this.createPanel(),e,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var e=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));e.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
+e.style.marginBottom="2px";e.style.width="100px";e.style.marginRight="2px";a.appendChild(e);e=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));e.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");e.style.marginBottom="2px";e.style.width="100px";a.appendChild(e);mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
+function(a,e,b){function c(a,e,b,c){l.getModel().beginUpdate();try{var d=[],k=[];if(null!=b.index){for(var m=[],f=b.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)m.push(f.getAttribute("data-pValue")),f=f.nextSibling;b.index<m.length?null!=c?m.splice(c,1):m[b.index]=e:m.push(e);null!=b.size&&m.length>b.size&&(m=m.slice(0,b.size));e=m.join(",");null!=b.countProperty&&(l.setCellStyles(b.countProperty,m.length,l.getSelectionCells()),d.push(b.countProperty),k.push(m.length))}l.setCellStyles(a,
+e,l.getSelectionCells());d.push(a);k.push(e);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var p=b.dependentPropsDefVal[a],g=b.dependentPropsVals[a];if(g.length>e)g=g.slice(0,e);else for(var u=g.length;u<e;u++)g.push(p);g=g.join(",");l.setCellStyles(b.dependentProps[a],g,l.getSelectionCells());d.push(b.dependentProps[a]);k.push(g)}if("function"==typeof b.onChange)b.onChange(l,e);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",k,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}
+function d(e,b,c){var d=mxUtils.getOffset(a,!0),k=mxUtils.getOffset(e,!0);b.style.position="absolute";b.style.left=k.x-d.x+"px";b.style.top=k.y-d.y+"px";b.style.width=e.offsetWidth+"px";b.style.height=e.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function k(a,e,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=e&&"none"!=e?e:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,
+function(k){this.editorUi.pickColor(e,function(e){d.style.background="none"==e?"url('"+Dialog.prototype.noColorImage+"')":e;c(a,e,b)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function m(a,e,b,d,k,m,f){null!=e&&(e=e.split(","),u.push({name:a,values:e,type:b,defVal:d,countProperty:k,parentRow:m,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(q,function(e){for(var p=m,q=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==
+a)p=p.nextSibling,q++;else break;var l={type:b,parentRow:m,index:q,isDeletable:!0,defVal:d,countProperty:k},q=g(a,"",l,0==q%2,f);c(a,d,l);p.parentNode.insertBefore(q,p.nextSibling);mxEvent.consume(e)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,e,b,c,d,k,m){if(0<d){var f=Array(d);e=null!=e?e.split(","):[];for(var p=0;p<d;p++)f[p]=null!=e[p]?e[p]:null!=c?c:"";u.push({name:a,values:f,type:b,defVal:c,parentRow:k,flipBkg:m,size:d})}return document.createElement("div")}
+function p(a,e,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==e;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",b)});return d}function g(e,b,g,l,u){var n=g.dispName,v=g.type,t=document.createElement("tr");t.className="gePropRow"+(u?"Dark":"")+(l?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",e);t.setAttribute("data-pValue",b);l=!1;null!=g.index&&(t.setAttribute("data-index",g.index),n=(null!=n?n:"")+"["+g.index+"]",l=!0);var B=document.createElement("td");
+B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(n,null,n));l&&(B.style.textAlign="right");t.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==v)B.appendChild(k(e,b,g));else if("bool"==v||"boolean"==v)B.appendChild(p(e,b,g));else if("enum"==v){var z=g.enumList;for(u=0;u<z.length;u++)if(n=z[u],n.val==b){B.innerHTML=mxUtils.htmlEntities(mxResources.get(n.dispName,null,n.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var k=
+document.createElement("select");d(B,k);for(var m=0;m<z.length;m++){var f=z[m],p=document.createElement("option");p.value=mxUtils.htmlEntities(f.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));k.appendChild(p)}k.value=b;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);c(e,a,g)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==v?B.appendChild(m(e,b,g.subType,g.subDefVal,g.countProperty,
+t,u)):"staticArr"==v?B.appendChild(f(e,b,g.subType,g.subDefVal,g.size,t,u)):(B.innerHTML=b,mxEvent.addListener(B,"click",mxUtils.bind(q,function(){function k(){var a=m.value,a=0==a.length&&"string"!=v?0:a;g.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=g.min&&a<g.min?a=g.min:null!=g.max&&a>g.max&&(a=g.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");c(e,a,g)}var m=document.createElement("input");d(B,m,!0);m.value=b;m.className=
+"gePropEditor";"int"!=v&&"float"!=v||g.allowAuto||(m.type="number",m.step="int"==v?"1":"any",null!=g.min&&(m.min=parseFloat(g.min)),null!=g.max&&(m.max=parseFloat(g.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k()});m.focus();mxEvent.addListener(m,"blur",function(){k()})})));g.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(a){c(e,"",g,g.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",
+B.appendChild(u));t.appendChild(B);return t}var q=this,l=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.className="geProperties";n.style.whiteSpace="nowrap";n.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;t.appendChild(B);mxUtils.write(t,mxResources.get("property"));
+v.style.cursor="pointer";var z=function(){var e=n.querySelectorAll(".gePropNonHeaderRow"),b;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],k=d.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(d)}catch(ua){}}else B.src=Sidebar.prototype.expandedImage,b="";for(c=0;c<e.length;c++)e[c].style.display=b};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;
+z()});v.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";t.innerHTML=mxResources.get("value");v.appendChild(t);n.appendChild(v);var x=!1,C=!1,y;for(y in e)if(v=e[y],"function"!=typeof v.isVisible||v.isVisible(b,this)){var G=null!=b.style[y]?mxUtils.htmlEntities(b.style[y]+""):null!=v.getDefaultValue?v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)C=!C;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||e[v.sizeProperty].defVal)||0;else if(null!=
+v.dependentProps){for(var D=v.dependentProps,J=[],A=[],t=0;t<D.length;t++){var I=b.style[D[t]];A.push(e[D[t]].subDefVal);J.push(null!=I?I.split(","):[])}v.dependentPropsDefVal=A;v.dependentPropsVals=J}n.appendChild(g(y,G,v,x,C));x=!x}}for(t=0;t<u.length;t++)for(v=u[t],e=v.parentRow,b=0;b<v.values.length;b++)y=g(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),e.parentNode.insertBefore(y,
+e.nextSibling),e=y;a.appendChild(n);z();return a};StyleFormatPanel.prototype.addStyles=function(a){function e(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,c=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
+var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.position="relative";m.style.textAlign="center";for(var f=[],p=0;p<this.defaultColorSchemes.length;p++){var g=document.createElement("div");g.style.display="inline-block";g.style.width="6px";g.style.height="6px";g.style.marginLeft="4px";g.style.marginRight=
+"3px";g.style.borderRadius="3px";g.style.cursor="pointer";g.style.background="transparent";g.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(g,"click",mxUtils.bind(this,function(){q(a)}))})(p);f.push(g);m.appendChild(g)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(f[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;l(this.defaultColorSchemes[this.format.currentScheme]);f[this.format.currentScheme].style.background=
+"#84d7ff"}),l=mxUtils.bind(this,function(a){var e=mxUtils.bind(this,function(a){var e=mxUtils.button("",function(e){c.getModel().beginUpdate();try{for(var d=c.getSelectionCells(),m=0;m<d.length;m++){for(var f=c.getModel().getStyle(d[m]),p=0;p<k.length;p++)f=mxUtils.removeStylename(f,k[p]);var g=c.getModel().isVertex(d[m])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,
+null)),mxEvent.isAltDown(e)||(f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(e)||(f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(g,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(e)||mxClient.IS_MAC&&mxEvent.isMetaDown(e)||!c.getModel().isVertex(d[m])||
+(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(g,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(g,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(g,mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(d[m])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,
+mxUtils.getValue(g,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[m],f)}}finally{c.getModel().endUpdate()}});e.className="geStyleButton";e.style.width="36px";e.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";e.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?e.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":e.style.backgroundImage=
+"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?e.style.background="url('"+Dialog.prototype.noColorImage+"')":e.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),e.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(b.initialDefaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var m=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");e.style.backgroundColor=m;e.style.border="1px solid "+f}d.appendChild(e)});d.innerHTML="";for(var m=0;m<a.length;m++)0<m&&0==mxUtils.mod(m,
+4)&&mxUtils.br(d),e(a[m])});null==this.format.currentScheme?q("dark"==uiTheme?1:0):q(this.format.currentScheme);var p=10>=this.defaultColorSchemes.length?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+p+"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(u,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:"+p+"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&&(a.appendChild(u),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));e(u);e(n);l(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(m);return a};StyleFormatPanel.prototype.addEditOps=function(a){var e=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(e=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
+e.setAttribute("title",mxResources.get("editShape")),e.style.marginBottom="2px",null==b?e.style.width="202px":(b.style.width="100px",e.style.width="100px",e.style.marginLeft="2px"),a.appendChild(e)):e.image&&(e=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),e.setAttribute("title",mxResources.get("editImage")),e.style.marginBottom="2px",null==b?e.style.width="202px":(b.style.width="100px",e.style.width="100px",e.style.marginLeft=
+"2px"),a.appendChild(e));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var v=Graph.prototype.init;
+Graph.prototype.init=function(){function a(a){e=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)e=document.createEventObject(a),e.type=a.type,e.canBubble=a.canBubble,e.cancelable=a.cancelable,e.view=a.view,e.detail=a.detail,e.screenX=a.screenX,e.screenY=a.screenY,e.clientX=a.clientX,e.clientY=a.clientY,e.ctrlKey=a.ctrlKey,e.altKey=a.altKey,e.shiftKey=a.shiftKey,e.metaKey=a.metaKey,e.button=a.button,e.relatedTarget=a.relatedTarget}catch(L){}}v.apply(this,arguments);
+window.mxFreehand&&(this.freehand=new mxFreehand(this));var e=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){e=null});this.isMouseInsertPoint=function(){return null!=e};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=e?this.getPointForEvent(e):b.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var e=this.graph.getCellStyle(a);
+if(null!=e){if("rack"==e.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=e.rackUnitSize?parseFloat(e.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=e.marginLeft||0;b.marginRight=e.marginRight||0;b.marginTop=e.marginTop||0;b.marginBottom=e.marginBottom||0;b.allowGaps=e.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==e.childLayout)return b=new mxTableLayout(this.graph),b.rows=e.tableRows||
+2,b.columns=e.tableColumns||2,b.colPercentages=e.colPercentages,b.rowPercentages=e.rowPercentages,b.equalColumns="1"==mxUtils.getValue(e,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(e,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),b.border=e.tableBorder||b.border,b.marginLeft=e.marginLeft||0,b.marginRight=e.marginRight||0,b.marginTop=e.marginTop||0,b.marginBottom=e.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(e,
+"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(e,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=e.colWidths||"100",b.rowHeights=e.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var e in a)this.globalVars[e]=a[e]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var x=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var e=x.apply(this,arguments);null==e&&null!=this.globalVars&&(e=this.globalVars[a]);
+return e};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,e,b,c,d,k,m,f,p,g,q,l){var u=null;l||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var n=A.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var v=n.ownerDocument,t=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?t.setAttributeNS("type","text/css"):t.setAttribute("type","text/css");for(var B="",z="",x=0;x<this.extFonts.length;x++){var C=this.extFonts[x].name,y=this.extFonts[x].url;0==y.indexOf(Editor.GOOGLE_FONTS)?B+="@import url("+y+");\n":z+='@font-face {\nfont-family: "'+
+C+'";\nsrc: url("'+y+'");\n}\n'}t.appendChild(v.createTextNode(B+z));n.getElementsByTagName("defs")[0].appendChild(t)}null!=u&&(this.stylesheet=u,this.refresh());return n};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=B.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var e=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,e.apply(this,arguments),a.text.value=d)}}else e.apply(this,arguments)}}return a};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){z.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
-null!=a.actions)){for(var d=0;d<a.actions.length;d++){var b=a.actions[d];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(d=0;d<a.actions.length;d++)b=a.actions[d],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(d=
-0;d<a.actions.length;d++){var b=a.actions[d],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));null!=b.viewbox&&this.fitWindow(b.viewbox,b.viewbox.border);0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,d){var b=
-this.getLinkForCell(d);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(a,b));if(this.isHtmlLabel(d)){var c=document.createElement("div");c.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=c.getElementsByTagName("a"),g=!1,m=0;m<e.length;m++)b=e[m].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(a,b)),g=!0);g&&this.labelChanged(d,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
-d){if("data:action/json,"==d.substring(0,17))try{var b=JSON.parse(d.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),d="data:action/json,"+JSON.stringify(b))}catch(L){}return d};Graph.prototype.updateCustomLinkActions=function(a,d){for(var b=0;b<d.length;b++){var c=d[b];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,
-c.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,d){if(null!=d&&null!=d.cells){for(var b=[],c=0;c<d.cells.length;c++)if("*"==d.cells[c])b.push(d.cells[c]);else{var e=a[d.cells[c]];null!=e?""!=e&&b.push(e):b.push(d.cells[c])}d.cells=b}};Graph.prototype.getCellsForAction=function(a,d){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,d))};Graph.prototype.getCellsById=function(a){var d=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var c=this.getDefaultParent(),
-d=d.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var e=this.model.getCell(a[b]);null!=e&&d.push(e)}return d};Graph.prototype.getCellsForTags=function(a,d,b,c){var e=[];if(null!=a){d=null!=d?d:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var g=0,m={},f=0;f<a.length;f++)0<a[f].length&&(m[a[f].toLowerCase()]=!0,g++);for(f=0;f<d.length;f++)if(c&&this.model.getParent(d[f])==this.model.root||this.model.isVertex(d[f])||this.model.isEdge(d[f])){var n=null!=
-d[f].value&&"object"==typeof d[f].value?mxUtils.trim(d[f].value.getAttribute(b)||""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var k=p=0;k<n.length&&p<g;k++)null!=m[n[k]]&&p++;p=p==g}}else p=0==a.length;p&&e.push(d[f])}}return e};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.model.setVisible(a[d],!this.model.isVisible(a[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,d){this.model.beginUpdate();
-try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],d)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,d,b,c){for(var e=0;e<a.length;e++)this.highlightCell(a[e],d,b,c)};Graph.prototype.highlightCell=function(a,d,b,c){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var e=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=c&&(g.opacity=c);g.highlight(a);window.setTimeout(function(){null!=
-g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition","all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;var c=a.ownerDocument,e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");
-g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");
-g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",this.svgShadowOpacity);g.setAttribute("result","offsetColor");e.appendChild(g);g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):c.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");
-g.setAttribute("in","SourceGraphic");g.setAttribute("in2","offsetBlur");e.appendChild(g);g=a.getElementsByTagName("defs");0==g.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)):c=g[0];c.appendChild(e);b||(d=null!=d?d:a.getElementsByTagName("g")[0],null!=d&&(d.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+
-6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),d=a.getAttribute("viewBox"),null!=d&&0<d.length&&(d=d.split(" "),3<d.length&&(w=parseFloat(d[2])+6,h=parseFloat(d[3])+6,a.setAttribute("viewBox",d[0]+" "+d[1]+" "+w+" "+h))))));return e};Graph.prototype.setShadowVisible=function(a,d){mxClient.IS_SVG&&!mxClient.IS_SF&&(d=null!=d?d:!0,(this.shadowVisible=a)?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 a=this.model.getChildCount(this.model.root),d,b=0;do d=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
+null!=a.actions)){for(var e=0;e<a.actions.length;e++){var b=a.actions[e];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(e=0;e<a.actions.length;e++)b=a.actions[e],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(e=
+0;e<a.actions.length;e++){var b=a.actions[e],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));null!=b.viewbox&&this.fitWindow(b.viewbox,b.viewbox.border);0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,e){var b=
+this.getLinkForCell(e);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(e,this.updateCustomLink(a,b));if(this.isHtmlLabel(e)){var c=document.createElement("div");c.innerHTML=this.sanitizeHtml(this.getLabel(e));for(var d=c.getElementsByTagName("a"),k=!1,m=0;m<d.length;m++)b=d[m].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[m].setAttribute("href",this.updateCustomLink(a,b)),k=!0);k&&this.labelChanged(e,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
+e){if("data:action/json,"==e.substring(0,17))try{var b=JSON.parse(e.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),e="data:action/json,"+JSON.stringify(b))}catch(M){}return e};Graph.prototype.updateCustomLinkActions=function(a,e){for(var b=0;b<e.length;b++){var c=e[b];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,
+c.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,e){if(null!=e&&null!=e.cells){for(var b=[],c=0;c<e.cells.length;c++)if("*"==e.cells[c])b.push(e.cells[c]);else{var d=a[e.cells[c]];null!=d?""!=d&&b.push(d):b.push(e.cells[c])}e.cells=b}};Graph.prototype.getCellsForAction=function(a,e){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,e))};Graph.prototype.getCellsById=function(a){var e=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var c=this.getDefaultParent(),
+e=e.concat(this.model.filterDescendants(function(a){return a!=c},c));else{var d=this.model.getCell(a[b]);null!=d&&e.push(d)}return e};Graph.prototype.getCellsForTags=function(a,e,b,c){var d=[];if(null!=a){e=null!=e?e:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var k=0,m={},f=0;f<a.length;f++)0<a[f].length&&(m[a[f].toLowerCase()]=!0,k++);for(f=0;f<e.length;f++)if(c&&this.model.getParent(e[f])==this.model.root||this.model.isVertex(e[f])||this.model.isEdge(e[f])){var p=null!=
+e[f].value&&"object"==typeof e[f].value?mxUtils.trim(e[f].value.getAttribute(b)||""):"",g=!1;if(0<p.length){if(p=p.toLowerCase().split(" "),p.length>=a.length){for(var q=g=0;q<p.length&&g<k;q++)null!=m[p[q]]&&g++;g=g==k}}else g=0==a.length;g&&d.push(e[f])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)this.model.setVisible(a[e],!this.model.isVisible(a[e]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,e){this.model.beginUpdate();
+try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],e)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,e,b,c){for(var d=0;d<a.length;d++)this.highlightCell(a[d],e,b,c)};Graph.prototype.highlightCell=function(a,e,b,c){e=null!=e?e:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,e,d,!1);null!=c&&(k.opacity=c);k.highlight(a);window.setTimeout(function(){null!=
+k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,e,b){b=null!=b?b:!1;var c=a.ownerDocument,d=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");d.setAttribute("id",this.shadowId);var k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");
+k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");d.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");
+k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");d.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):c.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");d.appendChild(k);k=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");
+k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");d.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)):c=k[0];c.appendChild(d);b||(e=null!=e?e:a.getElementsByTagName("g")[0],null!=e&&(e.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+
+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6),e=a.getAttribute("viewBox"),null!=e&&0<e.length&&(e=e.split(" "),3<e.length&&(w=parseFloat(e[2])+6,h=parseFloat(e[3])+6,a.setAttribute("viewBox",e[0]+" "+e[1]+" "+w+" "+h))))));return d};Graph.prototype.setShadowVisible=function(a,e){mxClient.IS_SVG&&!mxClient.IS_SF&&(e=null!=e?e:!0,(this.shadowVisible=a)?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 a=this.model.getChildCount(this.model.root),e,b=0;do e=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(e),"locked","0"));null!=e&&this.setDefaultParent(e)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.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=
@@ -9624,452 +9624,454 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
[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.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(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var D=mxMarker.createMarker;mxMarker.createMarker=
-function(a,d,b,c,e,g,m,f,n,p){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(f,Math.max(parseInt(z.value),parseInt(t.value))));t.value=Math.max(1,Math.min(f,Math.min(parseInt(z.value),parseInt(t.value))))}function c(d){function b(d,b,g){var m=d.useCssTransforms,f=d.currentTranslate,n=d.currentScale,p=d.view.translate,k=
-d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var l=d.getGraphBounds(),t=0,z=0,q=oa.get(),u=1/d.pageScale,x=B.checked;if(x)var u=parseInt(K.value),C=parseInt(ja.value),u=Math.min(q.height*C/(l.height/d.view.scale),q.width*u/(l.width/d.view.scale));else u=parseInt(v.value)/(100*d.pageScale),isNaN(u)&&(c=1/d.pageScale,v.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*
-c);q.height=Math.ceil(q.height*c);u*=c;!x&&d.pageVisible?(l=d.getPageLayout(),t-=l.x*q.width,z-=l.y*q.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(d,u,q,0,t,z,x);b.pageSelector=!1;b.mathEnabled=!1;t=a.getCurrentFile();null!=t&&(b.title=t.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
-null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var e=d.extFonts[c].name,g=d.extFonts[c].url;0==g.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+g+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+e+'";\n\tsrc: url("'+g+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var D=
-b.renderPage;b.renderPage=function(d,b,c,e,g,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}t=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());b.open(null,null,g,!0);null!=t&&(e.stylesheet=t,e.refresh())}else{q=
-d.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";b.backgroundColor=q;b.autoOrigin=x;b.appendGraph(d,u,t,z,g,!0);if(null!=d.extFonts&&null!=b.wnd)for(g=0;g<d.extFonts.length;g++)t=d.extFonts[g].name,z=d.extFonts[g].url,0==z.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+t+'";\n\tsrc: url("'+z+'");\n}'),
-b.wnd.document.writeln("</style>"))}m&&(d.useCssTransforms=m,d.currentTranslate=f,d.currentScale=n,d.view.translate=p,d.view.scale=k);return b}var c=parseInt(ha.value)/100;isNaN(c)&&(c=1,ha.value="100 %");var c=.75*c,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=t.value,f=z.value,p=!k.checked,l=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,k.checked,m,f,B.checked,K.value,ja.value,parseInt(v.value)/100,
-parseInt(ha.value)/100,oa.get());else{p&&(p=m==n&&f==n);if(!p&&null!=a.pages&&a.pages.length){var q=0,p=a.pages.length-1;k.checked||(q=parseInt(m)-1,p=parseInt(f)-1);for(var u=q;u<=p;u++){var x=a.pages[u],m=x==a.currentPage?e:null;if(null==m){var m=a.createTemporaryGraph(e.stylesheet),f=!0,q=!1,C=null,y=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(f=x.viewState.pageVisible,q=x.viewState.mathEnabled,C=x.viewState.background,y=x.viewState.backgroundImage,m.extFonts=
-x.viewState.extFonts);m.background=C;m.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;m.pageVisible=f;m.mathEnabled=q;var D=m.getGlobalVariable;m.getGlobalVariable=function(d){return"page"==d?x.getName():"pagenumber"==d?u+1:"pagecount"==d?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(x);m.model.setRoot(x.root)}l=b(m,l,u!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else l=b(e);null==l?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
-(l.mathEnabled&&(p=l.wnd.document,d&&(l.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),l.closeDocument(),!l.mathEnabled&&d&&PrintDialog.printPreview(l));null!=g&&(e.stylesheet=g,e.refresh())}}var e=a.editor.graph,g=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,d||mxResources.get("print"));g.appendChild(m);var f=1,n=1,p=
-document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");p.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var l=k.cloneNode(!0);k.setAttribute("checked","checked");
-l.setAttribute("value","range");p.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";p.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var z=t.cloneNode(!0);p.appendChild(z);mxEvent.addListener(t,"focus",
-function(){l.checked=!0});mxEvent.addListener(z,"focus",function(){l.checked=!0});mxEvent.addListener(t,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){n=m+1;t.value=n;z.value=n;break}t.setAttribute("max",f);z.setAttribute("max",f);a.isPagesEnabled()?1<f&&(g.appendChild(p),l.checked=!0):l.checked=!0;var q=document.createElement("div");q.style.marginBottom="10px";var u=document.createElement("input");
-u.style.marginRight="8px";u.setAttribute("value","adjust");u.setAttribute("type","radio");u.setAttribute("name","printZoom");q.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));q.appendChild(m);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";q.appendChild(v);mxEvent.addListener(v,"focus",function(){u.checked=!0});g.appendChild(q);var p=p.cloneNode(!1),B=u.cloneNode(!0);B.setAttribute("value",
-"fit");u.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(B);p.appendChild(m);q=document.createElement("table");q.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),I=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),H=D.cloneNode(!0);D.style.textAlign="right";E.style.textAlign=
-"right";mxUtils.write(D,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";A.appendChild(K);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));I.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var ja=K.cloneNode(!0);F.appendChild(ja);mxEvent.addListener(K,"focus",function(){B.checked=!0});mxEvent.addListener(ja,
-"focus",function(){B.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));H.appendChild(m);C.appendChild(D);C.appendChild(A);C.appendChild(I);y.appendChild(E);y.appendChild(F);y.appendChild(H);x.appendChild(C);x.appendChild(y);q.appendChild(x);p.appendChild(q);g.appendChild(p);p=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));p.appendChild(m);
-m=document.createElement("div");m.style.marginBottom="12px";var oa=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));p.appendChild(m);var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","100 %");ha.style.width="60px";p.appendChild(ha);g.appendChild(p);m=document.createElement("div");m.style.cssText=
-"text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);a.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),q.className="geBtn",m.appendChild(q));PrintDialog.previewEnabled&&(q=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),q.className="geBtn",m.appendChild(q));q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
-"print":"ok"),function(){a.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";m.appendChild(q);a.editor.cancelFirst||m.appendChild(p);g.appendChild(m);this.container=g};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
-(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.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 F=document.createElement("canvas"),H=new Image;H.onload=function(){try{F.getContext("2d").drawImage(H,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};H.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(I){}})();
+[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var e=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?e="mxgraph.er":"sysML"==a.substring(0,5)&&(e="mxgraph.sysml"));return e};var D=mxMarker.createMarker;mxMarker.createMarker=
+function(a,e,b,c,d,k,m,f,p,g){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&mxStencilRegistry.getStencil(q)}return D.apply(this,arguments)};PrintDialog.prototype.create=function(a,e){function b(){n.value=Math.max(1,Math.min(f,Math.max(parseInt(n.value),parseInt(u.value))));u.value=Math.max(1,Math.min(f,Math.min(parseInt(n.value),parseInt(u.value))))}function c(e){function b(e,b,k){var m=e.useCssTransforms,f=e.currentTranslate,p=e.currentScale,g=e.view.translate,q=
+e.view.scale;e.useCssTransforms&&(e.useCssTransforms=!1,e.currentTranslate=new mxPoint(0,0),e.currentScale=1,e.view.translate=new mxPoint(0,0),e.view.scale=1);var l=e.getGraphBounds(),u=0,v=0,n=ma.get(),t=1/e.pageScale,x=z.checked;if(x)var t=parseInt(H.value),C=parseInt(ga.value),t=Math.min(n.height*C/(l.height/e.view.scale),n.width*t/(l.width/e.view.scale));else t=parseInt(B.value)/(100*e.pageScale),isNaN(t)&&(c=1/e.pageScale,B.value="100 %");n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*
+c);n.height=Math.ceil(n.height*c);t*=c;!x&&e.pageVisible?(l=e.getPageLayout(),u-=l.x*n.width,v-=l.y*n.height):x=!0;if(null==b){b=PrintDialog.createPrintPreview(e,t,n,0,u,v,x);b.pageSelector=!1;b.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(b.title=u.getTitle());var y=b.writeHead;b.writeHead=function(b){y.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
+null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=e.extFonts)for(var c=0;c<e.extFonts.length;c++){var d=e.extFonts[c].name,k=e.extFonts[c].url;0==k.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+k+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+k+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var D=
+b.renderPage;b.renderPage=function(e,b,c,d,k,m){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var p=D.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:p.className="geDisableMathJax";return p}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,k,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{n=
+e.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=x;b.appendGraph(e,t,u,v,k,!0);if(null!=e.extFonts&&null!=b.wnd)for(k=0;k<e.extFonts.length;k++)u=e.extFonts[k].name,v=e.extFonts[k].url,0==v.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+v+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+u+'";\n\tsrc: url("'+v+'");\n}'),
+b.wnd.document.writeln("</style>"))}m&&(e.useCssTransforms=m,e.currentTranslate=f,e.currentScale=p,e.view.translate=g,e.view.scale=q);return b}var c=parseInt(ja.value)/100;isNaN(c)&&(c=1,ja.value="100 %");var c=.75*c,k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var m=u.value,f=n.value,g=!q.checked,l=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,m,f,z.checked,H.value,ga.value,parseInt(B.value)/100,
+parseInt(ja.value)/100,ma.get());else{g&&(g=m==p&&f==p);if(!g&&null!=a.pages&&a.pages.length){var v=0,g=a.pages.length-1;q.checked||(v=parseInt(m)-1,g=parseInt(f)-1);for(var t=v;t<=g;t++){var x=a.pages[t],m=x==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.stylesheet),f=!0,v=!1,C=null,y=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(f=x.viewState.pageVisible,v=x.viewState.mathEnabled,C=x.viewState.background,y=x.viewState.backgroundImage,m.extFonts=
+x.viewState.extFonts);m.background=C;m.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;m.pageVisible=f;m.mathEnabled=v;var D=m.getGlobalVariable;m.getGlobalVariable=function(e){return"page"==e?x.getName():"pagenumber"==e?t+1:"pagecount"==e?null!=a.pages?a.pages.length:1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(x);m.model.setRoot(x.root)}l=b(m,l,t!=g);m!=d&&m.container.parentNode.removeChild(m.container)}}else l=b(d);null==l?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(l.mathEnabled&&(g=l.wnd.document,e&&(l.wnd.IMMEDIATE_PRINT=!0),g.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),l.closeDocument(),!l.mathEnabled&&e&&PrintDialog.printPreview(l));null!=k&&(d.stylesheet=k,d.refresh())}}var d=a.editor.graph,k=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,e||mxResources.get("print"));k.appendChild(m);var f=1,p=1,g=
+document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");g.appendChild(q);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));g.appendChild(m);mxUtils.br(g);var l=q.cloneNode(!0);q.setAttribute("checked","checked");
+l.setAttribute("value","range");g.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");g.appendChild(m);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";g.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));g.appendChild(m);var n=u.cloneNode(!0);g.appendChild(n);mxEvent.addListener(u,"focus",
+function(){l.checked=!0});mxEvent.addListener(n,"focus",function(){l.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(n,"change",b);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){p=m+1;u.value=p;n.value=p;break}u.setAttribute("max",f);n.setAttribute("max",f);a.isPagesEnabled()?1<f&&(k.appendChild(g),l.checked=!0):l.checked=!0;var v=document.createElement("div");v.style.marginBottom="10px";var t=document.createElement("input");
+t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");v.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));v.appendChild(m);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";v.appendChild(B);mxEvent.addListener(B,"focus",function(){t.checked=!0});k.appendChild(v);var g=g.cloneNode(!1),z=t.cloneNode(!0);z.setAttribute("value",
+"fit");t.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(z);g.appendChild(m);v=document.createElement("table");v.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),y=C.cloneNode(!0),D=document.createElement("td"),A=D.cloneNode(!0),J=D.cloneNode(!0),F=D.cloneNode(!0),E=D.cloneNode(!0),I=D.cloneNode(!0);D.style.textAlign="right";F.style.textAlign=
+"right";mxUtils.write(D,mxResources.get("fitTo"));var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("min","1");H.setAttribute("type","number");H.style.width="40px";A.appendChild(H);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));J.appendChild(m);mxUtils.write(F,mxResources.get("fitToBy"));var ga=H.cloneNode(!0);E.appendChild(ga);mxEvent.addListener(H,"focus",function(){z.checked=!0});mxEvent.addListener(ga,
+"focus",function(){z.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));I.appendChild(m);C.appendChild(D);C.appendChild(A);C.appendChild(J);y.appendChild(F);y.appendChild(E);y.appendChild(I);x.appendChild(C);x.appendChild(y);v.appendChild(x);g.appendChild(v);k.appendChild(g);g=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));g.appendChild(m);
+m=document.createElement("div");m.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);g.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));g.appendChild(m);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";g.appendChild(ja);k.appendChild(g);m=document.createElement("div");m.style.cssText=
+"text-align:right;margin:48px 0 0 0;";g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&m.appendChild(g);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),v.className="geBtn",m.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),v.className="geBtn",m.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
+"print":"ok"),function(){a.hideDialog();c(!0)});v.className="geBtn gePrimaryBtn";m.appendChild(v);a.editor.cancelFirst||m.appendChild(g);k.appendChild(m);this.container=k};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
+(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
+this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),H=new Image;H.onload=function(){try{E.getContext("2d").drawImage(H,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(I){}};H.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(J){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.6.3";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.6.4";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
--1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}try{l||
-null==window.console||console.error(k,a,b,c,e,f)}catch(v){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
-null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(m){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=
-g;g+=d;return a.substring(b,g)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var m=d(a,4);if(null!=b&&b(g-8,m,c))break;value=d(a,c);d(a,4);if("IEND"==m)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
+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(a,b,c,d,f,g,l){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{l||
+null==window.console||console.error(g,a,b,c,d,f)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);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!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(m){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
+null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(m){}};EditorUi.parsePng=function(a,b,c){function e(a,e){var b=
+k;k+=e;return a.substring(b,k)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var k=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(a,4),"IHDR"!=e(a,4))null!=c&&c();else{e(a,17);do{c=d(a);var m=e(a,4);if(null!=b&&b(k-8,m,c))break;value=e(a,c);e(a,4);if("IEND"==m)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.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;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=
-document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(q){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(u){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{b=
+document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,g){var m=!1;this.active||(e.call(this,c),this.active=!0,null!=g&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize=
-"9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=g.substring(g.length-3,g.length)&&"!"!=g.charAt(g.length-1)&&(g+="..."),m.innerHTML=g,c.appendChild(m),d.status=m,mxClient.IS_VML&&
-(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,g)}));this.stop();return a}),m=!0);return m};var g=d.stop;d.stop=function(){g.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};
-d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+function(a,b,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=e.spin;e.spin=function(c,k){var m=!1;this.active||(d.call(this,c),this.active=!0,null!=k&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize=
+"9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=k.substring(k.length-3,k.length)&&"!"!=k.charAt(k.length-1)&&(k+="..."),m.innerHTML=k,c.appendChild(m),e.status=m,mxClient.IS_VML&&
+(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),m=!0);return m};var k=e.stop;e.stop=function(){k.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};
+e.pause=function(){return function(){}};return e};EditorUi.prototype.isCompatibleString=function(a){try{var e=mxUtils.parseXml(a),b=this.editor.extractGraphModel(e.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
-EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(d),k=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=k?mxUtils.getXml(k):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
-function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(c[e]));
-null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,f,k,l,q,v,x,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;v=null!=v?v:!0;var d,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?d="_blank":g=d=e;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){if(y){var n=a.ownerDocument.createElement("diagram");n.setAttribute("id",
-Editor.guid());n.appendChild(a)}else{n=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(n);if(Graph.decompress(m)!=n)return n;n=a.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(n)}x?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),
-m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),
-a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!f&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))y=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,d,g);else if(k||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),y=this.getEmbeddedSvg(y,b,
-e,null,q,v,g);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):
-(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
-e);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(e));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var e=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?d.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):e.toUpperCase()!=e?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(e)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(t){a[EditorUi.DIFF_INSERT][d].data=
-t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&
-delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=
-0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=
-d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),
-this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,f,k,l,q,v,x){f=null!=f?f:!0;k=null!=k?k:!1;var d=this.editor.graph;if(b||!a&&null!=v&&/(\.svg)$/i.test(v.getTitle()))if(x=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}l=null!=l?l:this.getXmlFileData(f,k,x);v=null!=v?v:this.getCurrentFile();a=this.createFileData(l,d,v,window.location.href,a,b,c,e,f,q,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);
-return a};EditorUi.prototype.getHtml=function(a,b,c,e,f,k){k=null!=k?k:!0;var d=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=k?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;k=Math.floor(d.x/m-b.view.translate.x);m=Math.floor(d.y/m-b.view.translate.y);d=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(g=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",k);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
-(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
+EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(e){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var c=b.getFunction,d=this.editor.graph,f=this;b.getFunction=function(a){if(d.isSelectionEmpty()&&null!=
+f.pages&&0<f.pages.length){var e=f.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<e&&f.movePage(e,e-1)};if(38==a.keyCode)return function(){0<e&&f.movePage(e,0)};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,e+1)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,f.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<e&&f.selectNextPage(!1)};if(38==
+a.keyCode)return function(){0<e&&f.selectPage(f.pages[0])};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.selectNextPage(!0)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.selectPage(f.pages[f.pages.length-1])}}}return c.apply(this,arguments)}}return b};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var e=d.apply(this,arguments);if(null==e)try{var b=a.indexOf("&lt;mxfile ");if(0<=b){var c=a.lastIndexOf("&lt;/mxfile&gt;");
+c>b&&(e=a.substring(b,c+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(t){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var e=a.indexOf('<meta charset="utf-8">');0<=e&&(a=a.slice(0,e)+'<meta charset="utf-8"/>'+a.slice(e+23-1,a.length));
+a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var e=null!=a?this.editor.extractGraphModel(a,!0):null;null!=e&&(a=e);if(null!=a){e=this.editor.graph;e.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
+this.pages:[];for(var d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));e.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,
+this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(d=0;d<b.length;d++)e.model.execute(new ChangePage(this,b[d],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,l,n,y,x,A){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;y=null!=y?y:!0;var e,k=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":k=e=d;if(null==a)return"";var m=a;if("mxfile"!=
+m.nodeName.toLowerCase()){if(A){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=a.ownerDocument.createElement("mxfile");m.appendChild(p)}x?(m=m.cloneNode(!0),m.removeAttribute("modified"),m.removeAttribute("host"),m.removeAttribute("agent"),m.removeAttribute("etag"),
+m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.removeAttribute("userAgent"),m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("pages"),m.removeAttribute("type"),mxClient.IS_CHROMEAPP?m.setAttribute("host","Chrome"):EditorUi.isElectronApp?m.setAttribute("host","Electron"):m.setAttribute("host",window.location.hostname),m.setAttribute("modified",(new Date).toISOString()),m.setAttribute("agent",navigator.appVersion),
+m.setAttribute("version",EditorUi.VERSION),m.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&m.setAttribute("type",a),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));A=A?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!g&&!f&&(l||null!=c&&/(\.html)$/i.test(c.getTitle())))A=this.getHtml2(mxUtils.getXml(m),b,null!=c?c.getTitle():null,e,k);else if(g||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&
+c.getMode()!=App.MODE_BROWSER||(d=null),A=this.getEmbeddedSvg(A,b,d,null,n,y,k);return A};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));e.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(e)),e=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
+d);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(d));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var e=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?e.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?e.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?e.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(d)?e.push(" "):e.push("?"):e.push(b?"0":Math.round(9*Math.random()))}return e.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var e=0;e<a[EditorUi.DIFF_INSERT].length;e++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(b)}catch(u){a[EditorUi.DIFF_INSERT][e].data=
+u.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][c];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(e=mxUtils.bind(this,function(a){var e=d.cells[a];if(null!=e){for(var b in e)null!=e[b].value&&(e[b].value="["+e[b].value.length+"]"),null!=e[b].xmlValue&&(e[b].xmlValue="["+e[b].xmlValue.length+"]"),null!=e[b].style&&(e[b].style="["+e[b].style.length+"]"),0==Object.keys(e[b]).length&&delete e[b];0==Object.keys(e).length&&
+delete d.cells[a]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!=a.attributes[e].name&&a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=
+0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=
+e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],e[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
+this.editor.setStatus(""),a?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){e.handleFileError(a,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){e.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,l,n,y,x){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=y&&/(\.svg)$/i.test(y.getTitle()))if(x=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var k=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),m=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(m.root)}l=null!=l?l:this.getXmlFileData(f,g,x);y=null!=y?y:this.getCurrentFile();a=this.createFileData(l,e,y,window.location.href,a,b,c,d,f,n,x);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,k=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),m=b.view.scale;g=Math.floor(e.x/m-b.view.translate.x);m=Math.floor(e.y/m-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(k=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&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;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+k+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=f&&(f=f.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
-null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),
+null;var e=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(e)throw Error(mxResources.get("notADiagramFile")+" ("+e+")");e=null!=a?this.editor.extractGraphModel(a,!0):null;null!=e&&(a=e);if(null!=a&&"mxfile"==a.nodeName&&(e=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var c=0;c<e.length;c++)null==e[c].getAttribute("id")&&e[c].setAttribute("id",c),a=new DiagramPage(e[c]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var f=this.editor.graph.getModel(),k=f.getChildren(f.root),c=0;c<k.length;c++){var l=k[c];f.setVisible(l,a[l.id]||!1)}}catch(v){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(a,b,c,e,f,k,l,q,v,x,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!f),
-g=d+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,f,null,null,null,b);this.saveData(g,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=d+".png":"jpeg"==a&&(g=d+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;
-null!=k&&(this.editor.graph.pageVisible=k);var g=this.createDownloadRequest(d,a,e,b,l,f,q,v,x,y);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var n=null,p=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var t=this.editor.graph.background;if(l||t==mxConstants.NONE)t=
-null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();p(a)}),e)}}catch(H){this.handleError(H)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,c,e,f,k,l,q,v,x){var d=this.editor.graph,g=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==k?!1:"xmlpng"!=b);var m="",n="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==k&&(n="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){m="&from="+k;break}k=d.background;"png"!=b&&"pdf"!=b||!f?f||
-null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;f={globalVars:d.getExportVariables()};v&&(f.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+n+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,
-b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,e=mxUtils.bind(this,function(c){var e=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<e.length&&(e+="\n"),e+=c);c=new LocalFile(this,"csv"!=a.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(e,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var g=null!=a.interval?parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
-n=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();f()}));n();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var g=a.url;/^https?:\/\//.test(g)&&!this.editor.isCorsEnabledForUrl(g)&&(g=PROXY_URL+"?url="+encodeURIComponent(g));this.editor.loadUrl(g,mxUtils.bind(this,function(a){e(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else e("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=
-new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,f=e.getModel();f.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var v=a.getAttribute("value");if(null!=v){var x=
-mxUtils.parseXml(v).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var y=x.attributes,A=0;A<y.length;A++)e.setAttributeForCell(l,y[A].nodeName,0<y[A].nodeValue.length?y[A].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+l.id+": "+I)}try{var z=a.getAttribute("style");null!=z&&e.model.setStyle(l,z)}catch(I){null!=window.console&&console.log("Error in style for "+l.id+": "+I)}try{var B=a.getAttribute("icon");if(null!=B){var C=
-0<B.length?JSON.parse(B):null;null!=C&&C.append||e.removeCellOverlays(l);null!=C&&e.addCellOverlay(l,d(C))}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}try{var D=a.getAttribute("geometry");if(null!=D){var D=JSON.parse(D),E=e.getCellGeometry(l);if(null!=E){E=E.clone();for(key in D){var F=parseFloat(D[key]);"dx"==key?E.x+=F:"dy"==key?E.y+=F:"dw"==key?E.width+=F:"dh"==key?E.height+=F:E[key]=parseFloat(D[key])}e.model.setGeometry(l,E)}}}catch(I){null!=window.console&&
-console.log("Error in icon for "+l.id+": "+I)}}}else if("model"==a.nodeName){for(var H=a.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(a.firstChild)).decode(H,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",e=d.lastIndexOf(".");0<=e&&(c=d.substring(e),d=d.substring(0,e));if(b)var g=new Date,e=g.getFullYear(),f=g.getMonth()+1,k=g.getDate(),l=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+f+"-"+k+"-"+l+"-"+x+"-"+g));
-return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();this.editor.graph.model.clear();
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(c=0;c<d.length;c++)a[d[c]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),c=0;c<g.length;c++){var l=g[c];f.setVisible(l,a[l.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){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)||/(\.drawio)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));!a&&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(a,b,c,d,f,g,l,n,y,x,A){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),
+k=e+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(k,a,m,"text/xml")}else if("html"==a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(k,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?k=e+".png":"jpeg"==a&&(k=e+".jpg"),this.saveRequest(k,a,mxUtils.bind(this,function(e,b){try{var c=this.editor.graph.pageVisible;
+null!=g&&(this.editor.graph.pageVisible=g);var k=this.createDownloadRequest(e,a,d,b,l,f,n,y,x,A);this.editor.graph.pageVisible=c;return k}catch(N){this.handleError(N)}}));else{var p=null,q=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var u=this.editor.graph.background;if(l||u==mxConstants.NONE)u=
+null;var v=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(v);this.editor.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();q('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else k=e+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();q(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
+function(a,b,c,d,f,g,l,n,y,x){var e=this.editor.graph,k=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var m="",p="";if(k.width*k.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==g&&(p="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){m="&from="+g;break}g=e.background;"png"!=b&&"pdf"!=b||!f?f||
+null!=g&&g!=mxConstants.NONE||(g="#ffffff"):g=mxConstants.NONE;f={globalVars:e.getExportVariables()};y&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+m+p+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=l?"&scale="+l:"")+(null!=n?"&border="+n:""))};EditorUi.prototype.setMode=function(a,
+b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var k=null!=a.interval?parseInt(a.interval):6E4,m=null,f=mxUtils.bind(this,function(){var e=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){e===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+g=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(f,k)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();f()}));g();f()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var k=a.url;/^https?:\/\//.test(k)&&!this.editor.isCorsEnabledForUrl(k)&&(k=PROXY_URL+"?url="+encodeURIComponent(k));this.editor.loadUrl(k,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function e(a){var e=
+new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);e.addListener(mxEvent.CLICK,function(e,b){c.alert(a.tooltip)});return e}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var l=f.getCell(a.getAttribute("id"));if(null!=l){try{var n=a.getAttribute("value");if(null!=n){var x=
+mxUtils.parseXml(n).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(l,x);else for(var A=x.attributes,B=0;B<A.length;B++)d.setAttributeForCell(l,A[B].nodeName,0<A[B].nodeValue.length?A[B].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+l.id+": "+I)}try{var z=a.getAttribute("style");null!=z&&d.model.setStyle(l,z)}catch(I){null!=window.console&&console.log("Error in style for "+l.id+": "+I)}try{var C=a.getAttribute("icon");if(null!=C){var D=
+0<C.length?JSON.parse(C):null;null!=D&&D.append||d.removeCellOverlays(l);null!=D&&d.addCellOverlay(l,e(D))}}catch(I){null!=window.console&&console.log("Error in icon for "+l.id+": "+I)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),E=d.getCellGeometry(l);if(null!=E){E=E.clone();for(key in F){var H=parseFloat(F[key]);"dx"==key?E.x+=H:"dy"==key?E.y+=H:"dw"==key?E.width+=H:"dh"==key?E.height+=H:E[key]=parseFloat(F[key])}d.model.setGeometry(l,E)}}}catch(I){null!=window.console&&
+console.log("Error in icon for "+l.id+": "+I)}}}else if("model"==a.nodeName){for(var J=a.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(a.firstChild)).decode(J,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var e=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=e.lastIndexOf(".");0<=d&&(c=e.substring(d),e=e.substring(0,d));if(b)var k=new Date,d=k.getFullYear(),f=k.getMonth()+1,g=k.getDate(),l=k.getHours(),n=k.getMinutes(),k=k.getSeconds(),e=e+(" "+(d+"-"+f+"-"+g+"-"+l+"-"+n+"-"+k));
+return e=mxResources.get("copyOf",[e])+c};EditorUi.prototype.fileLoaded=function(a,b){var e=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=e&&(EditorUi.debug("File.closed",[e]),e.removeListener(this.descriptorChangedListener),e.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=e&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){this.fileLoadedError=u;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+u.message,label:"stack_"+u.stack})}catch(q){}var g=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):e()});b?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,e=new mxCodec;null!=b&&(b.byteCount=
-0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var g=0;g<a.length;g++){this.updatePageRoot(a[g]);var f=a[g].node.cloneNode(!1);f.removeAttribute("name");c.root=a[g].root;var k=e.encode(c);this.editor.graph.saveViewState(a[g].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");f.appendChild(k);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(f,function(a,d,b,c){return!c||"mxGeometry"!=
-a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var g=a.attributes[e].name,
-f=null!=b?b(a,g,a.attributes[e].value,!0):a.attributes[e].value;null!=f&&(d^=this.hashValue(g,b,c)+this.hashValue(f,b,c))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)d=(d<<5)-d+this.hashValue(a.childNodes[e],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,c,e,f,k,l){};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(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),
-b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));
-this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=
-null,f=mxUtils.bind(this,function(b,d){0==b.length&&a.isEditable()?(null==g&&(g=document.createElement("div"),g.className="geDropTarget",mxUtils.write(g,mxResources.get("dragElementsHere"))),d.appendChild(g)):this.addLibraryEntries(b,d)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var k=m.parentNode.previousSibling;e=k.getAttribute("title");
-null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");
-l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
-C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.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",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
-"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=z.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
-(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),F=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),d=z.view.getBounds(b),c=z.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=z.view.translate.x;d.y-=z.view.translate.y;
-E(b,d)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
-"",m.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
-function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,k,n,p,l,z,t){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var q=!1,u=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=
-JSON.parse(mxUtils.getTextContent(e.documentElement));f(k,m);b=b.concat(k);D(a);this.spinner.stop();q=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}q=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=t&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(t,function(a){u(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
-m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(g+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
-0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.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=mxClient.IS_QUIRKS?
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){this.fileLoadedError=t;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+t.message,label:"stack_"+t.stack})}catch(v){}var k=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=e?this.fileLoaded(e):d()});b?k():this.handleError(t,mxResources.get("errorLoadingFile"),k,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var e=0,c=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
+0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var k=0;k<a.length;k++){this.updatePageRoot(a[k]);var f=a[k].node.cloneNode(!1);f.removeAttribute("name");c.root=a[k].root;var g=d.encode(c);this.editor.graph.saveViewState(a[k].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");f.appendChild(g);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);e=(e<<5)-e+this.hashValue(f,function(a,b,e,c){return!c||"mxGeometry"!=
+a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},b)<<0}return e};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var k=a.attributes[d].name,
+m=null!=b?b(a,k,a.attributes[d].value,!0):a.attributes[d].value;null!=m&&(e^=this.hashValue(k,b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
+function(a,b,c,d,f,g,l){};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(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),
+e=b.createElement("mxlibrary");mxUtils.setTextContent(e,JSON.stringify(a));b.appendChild(e);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var e=0;e<b.length;e++)b[e].parentNode.removeChild(b[e]);delete this.sidebar.palettes[a]}};
+EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var e=this.sidebar.palettes["L.scratchpad"];null==e&&(e=this.sidebar.palettes.search);null!=e&&(a=e[e.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var e=b.lastChild,c=e.previousSibling;b.insertBefore(e,a);b.insertBefore(c,e)};EditorUi.prototype.loadLibrary=function(a,b){var e=mxUtils.parseXml(a.getData());if("mxlibrary"==e.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(e.documentElement));
+this.libraryLoaded(a,c,e.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var k=
+null,f=mxUtils.bind(this,function(b,e){0==b.length&&a.isEditable()?(null==k&&(k=document.createElement("div"),k.className="geDropTarget",mxUtils.write(k,mxResources.get("dragElementsHere"))),e.appendChild(k)):this.addLibraryEntries(b,e)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(e);var g=m.parentNode.previousSibling;d=g.getAttribute("title");
+null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(p.style.backgroundColor="inherit");g.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");
+l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)p.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var e=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,C=null,
+D=mxUtils.bind(this,function(e){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(e)}),F=mxUtils.bind(this,function(e){a.setModified(!0);a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=l.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),g.style.paddingRight=18*p.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),g.style.paddingRight=18*p.childNodes.length+"px")})):null==n&&(n=l.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),p.insertBefore(n,p.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(e){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(g.style.paddingRight=18*p.childNodes.length+
+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(e)})),g.style.paddingRight=18*p.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,e,c,d){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var g=z.getCellGeometry(a[f]);null!=g&&g.translate(-e.x,-e.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,e.width,e.height,d||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:e.width,h:e.height};null!=d&&
+(a.title=d);b.push(a);F(c);null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)}),H=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),e=z.view.getBounds(b),c=z.view.scale;e.x/=c;e.y/=c;e.width/=c;e.height/=c;e.x-=z.view.translate.x;e.y-=z.view.translate.y;
+E(b,e)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
+"",m.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
+function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(e,c,d,g,p,l,n,q,u){if(null!=e&&"image/"==c.substring(0,6))e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(e),e=[new mxCell("",new mxGeometry(0,0,p,l),e)],e[0].vertex=!0,E(e,new mxRectangle(0,0,p,l),a,mxEvent.isAltDown(a)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null);else{var v=!1,B=mxUtils.bind(this,function(e,c){if(null!=e&&"application/pdf"==c){var d=Editor.extractGraphModelFromPdf(e);null!=d&&0<d.length&&(e=d)}if(null!=e)if(d=mxUtils.parseXml(e),"mxlibrary"==d.documentElement.nodeName)try{var g=
+JSON.parse(mxUtils.getTextContent(d.documentElement));f(g,m);b=b.concat(g);F(a);this.spinner.stop();v=!0}catch(P){}else if("mxfile"==d.documentElement.nodeName)try{for(var p=d.documentElement.getElementsByTagName("diagram"),g=0;g<p.length;g++){var l=this.stringToCells(Editor.getDiagramNodeXml(p[g])),n=this.editor.graph.getBoundingBoxFromGeometry(l);E(l,new mxRectangle(0,0,n.width,n.height),a)}v=!0}catch(P){null!=window.console&&console.log("error in drop handler:",P)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=k&&null!=k.parentNode&&0<b.length&&(k.parentNode.removeChild(k),k=null)});null!=u&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(u,function(a){B(a,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,n)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(e,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));p.insertBefore(l,p.firstChild);mxEvent.addListener(l,"click",D);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
+m&&D(a)});d=l.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));p.insertBefore(d,p.firstChild);mxEvent.addListener(d,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),p.insertBefore(d,p.firstChild))}g.appendChild(p);g.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var e=0;e<a.length;e++){var c=a[e],d=c.data;if(null!=d){var d=this.convertDataUri(d),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+d,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(d=this.stringToCells(Graph.decompress(c.xml)),
+0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.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=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,f){a=new ImageDialog(this,a,b,c,e,f);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var d=new ChangePageSetup(this,null,a);d.ignoreColor=!0;this.editor.graph.model.execute(d)}});var d=new BackgroundImageDialog(this,a,b);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,f){a=new LibraryDialog(this,a,b,c,e,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
-function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,b){if(!b){var e=new ChangePageSetup(this,null,a);e.ignoreColor=!0;this.editor.graph.model.execute(e)}});var e=new BackgroundImageDialog(this,a,b);this.showDialog(e.container,360,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var c=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=c.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));
-a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,f,k,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=g||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),
-n=null;b=null!=b?b:mxResources.get("error");if(null!=g){null!=g.retry&&(m=mxResources.get("cancel"),n=function(){d();g.retry()});if(404==g.code||404==g.status||403==g.code){l=403==g.code?null!=g.message?mxUtils.htmlEntities(g.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?k:window.location.hash;
-if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==g.code||404==g.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):p.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
-p);this.handleError(a,b,c,e,f)}),n,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var d=document.createElement("option");mxUtils.write(d,b[a].displayName);d.value=a;e.appendChild(d);d=document.createElement("option");d.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(d,"<"+b[a].email+">");d.setAttribute("disabled","disabled");e.appendChild(d)}d=document.createElement("option");mxUtils.write(d,mxResources.get("addAccount"));d.value=b.length;
-e.appendChild(d)}var b=this.drive.getUsersList(),d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var d=e.value,c=b.length!=d;c&&this.drive.setUser(b[d]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
-!0)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(d.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=g.message?l=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error?l=mxUtils.htmlEntities(g.response.error):"undefined"!==typeof window.App&&(g.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):
-g.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var z=k=null;null!=g&&null!=g.helpLink&&(k=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(g.helpLink)}));this.showError(b,l,m,c,n,null,null,k,z,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,e,
-f,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,f,null,null,null,null,g);this.showDialog(a.container,340,46+g,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
-e.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(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+
-"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);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;";e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);
-this.bannerShowing=!0;var g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight="6px";g.appendChild(f);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));g.appendChild(b);e.style.paddingBottom="30px";e.appendChild(g);var m=mxUtils.bind(this,
-function(){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,f.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));var k=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(e,"click",
-mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);d!=f&&d!=b?(null!=c&&c(),m(),mxEvent.consume(a)):k()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(k,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
-EditorUi.prototype.createImageDataUri=function(a,b,c,e){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",e));return d};EditorUi.prototype.saveCanvas=function(a,b,c,e,f){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,f);this.saveData(e,d,a.substring(a.lastIndexOf(",")+
-1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,
-620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,f,k){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b=b+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",
-!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(g?parseInt(g[2],10):!1)?!1:k}if(k||this.isOffline()){d.href=URL.createObjectURL(e?
-this.base64ToBlob(a,c):new Blob([a],{type:c}));k?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(v){}}else this.createEchoRequest(a,b,c,e,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,f,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=k?"&base64="+
-k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),g=Array(e),f=0;f<e;++f){for(var k=1024*f,l=Math.min(k+1024,c),x=Array(l-k),y=0;k<l;++y,++k)x[y]=d[k].charCodeAt(0);g[f]=new Uint8Array(x)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,f,k,l,q){k=null!=k?k:!1;l=null!=l?l:"vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(k);
-isLocalStorage&&f++;var d=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){try{if("_blank"==d)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),g.document.close())}else d==App.MODE_DEVICE||"download"==d?this.doSaveLocalFile(a,b,c,e,null,q):null!=b&&0<b.length&&this.pickFolder(d,mxUtils.bind(this,function(g){try{this.exportFile(a,
-b,c,e,d,g)}catch(B){this.handleError(B)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,l,null,1<f,d,a,c,e);k=this.isServices(f)?f>d?390:270:160;this.showDialog(b.container,400,k,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?d.document.write("<html>"+
-a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,
-"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var c=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";
-this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.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(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",
-mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);d.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",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,f){this.isLocalFileSave()?this.saveLocalFile(c,a,e,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,f,b,d)}),c,f,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,f,k,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
-function(a,d){if("_blank"==d||null!=a&&0<a.length){var g=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=g&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?g.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,k,!0,d,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),a,k,!0,d,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<d,g,e,k,f);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,f,k){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,f,k,l,q,v,x,y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g=y?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var m=this.editor.graph.getSvg(g,a,l,q,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,y);e&&this.editor.graph.addSvgShadow(m);var n=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,v,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,p,this.thumbImageCache)):p(m)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(a,b,c,e,f,k,l){return this.addCheckbox(a,
-c,e,f,k,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,f,k,l,q){k=null!=k?k:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();d.id=l;null!=q&&d.setAttribute("name",q);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");k&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,b),c.setAttribute("for",l),a.appendChild(c),
-f||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
-mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));
-mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+
-g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value",
-"blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",f=null,f=mxUtils.button("",
-mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;d()});mxEvent.consume(a)}));d();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createUrlParameters=
-function(a,b,c,e,f,k,l){l=null!=l?l:[];e&&("1"==urlParams.dev&&l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&l.push("edit="+encodeURIComponent(f)),k&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());return l};EditorUi.prototype.createLink=function(a,
-b,c,e,f,k,l,q,v){v=null!=v?v:this.createUrlParameters(a,b,c,e,f,k);a=this.getCurrentFile();b=!0;null!=l?c="#U"+encodeURIComponent(l):(a=this.getCurrentFile(),q||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&v.push("title="+encodeURIComponent(a.getTitle()));return(e&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<v.length?"?"+v.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,f,k,l,q,v,x,y){this.getBasenames();var d={};""!=f&&f!=mxConstants.NONE&&(d.highlight=f);"auto"!==e&&(d.target=e);v||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];l&&(c.push("pages"),
-d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);q&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),d.toolbar=c.join(" "));null!=x&&0<x.length&&(d.edit=x);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+
-encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,
-mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");g=m.cloneNode(!0);g.setAttribute("value",
-"copy");f.appendChild(g);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(k);mxUtils.br(f);f.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));f.appendChild(k);var l=this.getCurrentFile();null==c&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),f.appendChild(k),
-mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));g.setAttribute("checked","checked");null==c&&m.setAttribute("disabled","disabled");d.appendChild(f);var n=this.addLinkSection(d),A=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=
-"100%";d.appendChild(z);var B=this.addCheckbox(d,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(d,mxResources.get("allPages"),f,!f),D=this.addCheckbox(d,mxResources.get("layers"),!0),E=this.addCheckbox(d,mxResources.get("lightbox"),!0),F=this.addEditButton(d,E),H=F.getEditInput();H.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&E.checked?F.getEditSelect().removeAttribute("disabled"):
-F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(m.checked?c:null,A.checked,z.value,n.getTarget(),n.getColor(),B.checked,C.checked,D.checked,E.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,f,k,l){l=document.createElement("div");l.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,a||mxResources.get("link"));d.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=this.getCurrentFile(),d="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var d="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace=
-"normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);l.appendChild(m);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"));m.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(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,z=null;if(null!=c||null!=e)a+=30,mxUtils.write(l,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight=
-"16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight="16px",p.style.marginBottom="10px",p.value="100%",l.appendChild(p),mxUtils.write(l,mxResources.get("height")+":"),z=document.createElement("input"),z.setAttribute("type","text"),z.style.width="50px",z.style.marginLeft="6px",z.style.marginBottom="10px",z.value=e+"px",l.appendChild(z),mxUtils.br(l);var t=this.addLinkSection(l,k);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=
-this.addCheckbox(l,mxResources.get("allPages"),c,!c);var D=this.addCheckbox(l,mxResources.get("lightbox"),!0,null,null,!k),E=this.addEditButton(l,D),F=E.getEditInput();k&&(F.style.marginLeft=D.style.marginLeft,D.style.display="none",a-=30);var H=this.addCheckbox(l,mxResources.get("layers"),!0);H.style.marginLeft=F.style.marginLeft;H.style.marginBottom="16px";H.style.marginTop="8px";mxEvent.addListener(D,"change",function(){D.checked?(H.removeAttribute("disabled"),F.removeAttribute("disabled")):(H.setAttribute("disabled",
-"disabled"),F.setAttribute("disabled","disabled"));F.checked&&D.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==u?!0:u.checked,D.checked,E.getLink(),H.checked,null!=p?p.value:null,null!=z?z.value:null)}),null,mxResources.get("create"),d);this.showDialog(b.container,340,254+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,f){var d=document.createElement("div");d.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:"+(f?"10":"4")+"px";d.appendChild(g);if(f){mxUtils.write(d,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";d.appendChild(m);mxUtils.write(d,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";d.appendChild(k);mxUtils.br(d)}var l=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=p&&(p.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(m.value)/100||1,b=parseInt(k.value)||0;c(!l.checked,null!=n?n.checked:!1,null!=p?p.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,c,e,f,k,l,q){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph,m="jpeg"==q?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight=
-"12px";p.value=this.lastExportZoom||"100%";d.appendChild(p);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||"0";d.appendChild(t);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=q),D=null;"dark"==uiTheme&&(D=this.addCheckbox(d,mxResources.get("dark"),!0),m+=26);var E=this.addCheckbox(d,
-mxResources.get("selectionOnly"),!1,g.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");k&&(d.appendChild(F),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),m+=26,mxEvent.addListener(E,"change",function(){E.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(F.setAttribute("checked","checked"),
-F.defaultChecked=!0);var H=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(d.appendChild(I),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),m+=26);var K=null;if("png"==q||"jpeg"==q)K=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
-!0),m+=26;var G=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=q),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(d,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=q);O.style.marginLeft="24px";O.style.marginBottom="16px";L?m+=26:O.style.display="none";mxEvent.addListener(G,"change",function(){G.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});l&&L||O.setAttribute("disabled","disabled");var J=document.createElement("select");
-J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==
-q&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(J),mxUtils.br(d),mxUtils.br(d),m+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=p.value;f(p.value,u.checked,!E.checked,H.checked,G.checked,I.checked,t.value,F.checked,!O.checked,J.value,null!=K?K.checked:null,null!=D?D.checked:null)}),null,c,e);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,f){var d=document.createElement("div");d.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(m)}var k=this.addCheckbox(d,mxResources.get("fit"),!0),l=this.addCheckbox(d,mxResources.get("shadow"),g.shadowVisible&&e,
-!e),n=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),z=this.addEditButton(d,p),B=z.getEditInput(),C=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(d,mxResources.get("layers"),C,!C);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(C&&D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));
-B.checked&&p.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,l.checked,n.checked,p.checked,z.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,f,k,l,q){function d(b){var d=" ",m="";e&&(d=" 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"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');l('<img src="'+b+'"'+n+(""!=m?' style="'+m+'"':"")+d+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,
-mxUtils.bind(this,function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+m+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+
-n.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,c,e,f,k,l){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),g=d.getElementsByTagName("a");if(null!=g)for(var m=0;m<g.length;m++){var n=g[m].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==g[m].getAttribute("target")&&g[m].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));
-b&&this.editor.graph.addSvgShadow(d);if(c){var p=" ",z="";e&&(p="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"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");a&&
-(z+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=z?' style="'+z+'"':"")+p+"/>")}))}else z="",e&&(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"+(f?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),z+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),z+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=z&&d.setAttribute("style",z),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),l(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==
-a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,d=0;if(null!=a){if(a.hasAttribute("scale")){var c=
-parseFloat(a.getAttribute("scale"));!isNaN(c)&&0<c&&(b=c)}a.hasAttribute("border")&&(c=parseInt(a.getAttribute("border")),!isNaN(c)&&0<c&&(d=c))}return{scale:b,border:d}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,e,f){try{var d=this.editor.graph,g=null!=d.themes&&"darkTheme"==d.defaultThemeName,m=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,
-!0),d),m=c;else if(g||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),k=d.getGlobalVariable,l=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:k.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==m&&(m=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=c.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,
-"tEXt","mxfile",encodeURIComponent(m));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(z){null!=b&&b(z)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,d.shadowVisible,null,d,f)}catch(y){null!=b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,f,k,l,q){q=null!=q?q:!0;l=b.background;l==mxConstants.NONE&&(l=null);k=b.getSvg(l,null,null,null,null,k);b.shadowVisible&&b.addSvgShadow(k);null!=a&&
-k.setAttribute("content",a);null!=c&&k.setAttribute("resource",c);if(null!=f)this.embedFonts(k,mxUtils.bind(this,function(a){q?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(n){b(a)}}))}catch(m){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,c,e,f,k,l,q,v,x,y,A){v=null!=v?v:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,q):null,v,null==this.pages||0==this.pages.length,y)}catch(C){"Invalid image"==C.message?this.downloadFile(v):
-this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,k,l,x,A)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,c,e,f){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var m=mxUtils.parseXml(a);a={};
-var k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var l=k.getElementsByTagName("diagram");if(1==l.length)k=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(a[l[0].getAttribute("id")]=this.currentPage.getId());else if(1<l.length){var m=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[l[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(l[0]),e=!1,n=1);for(;n<l.length;n++){var p=
-l[n].getAttribute("id");l[n].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(l[n]));a[p]=l[n].getAttribute("id");var B=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[B+1]));g.model.execute(new ChangePage(this,z,z,B,!0));m.push(z)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=g.importGraphModel(k,b,c,e),null!=d))for(n=0;n<d.length;n++)this.updatePageLinksForCell(a,d[n])}finally{g.model.endUpdate()}}}catch(C){if(f)throw C;this.handleError(C)}return d};
-EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.sanitizeHtml(c.getLabel(b));for(var g=d.getElementsByTagName("a"),f=!1,k=0;k<g.length;k++)e=g[k].getAttribute("href"),null!=e&&(g[k].setAttribute("href",this.updatePageLink(a,
-e)),f=!0);f&&c.labelChanged(b,d.innerHTML)}for(k=0;k<c.model.getChildCount(b);k++)this.updatePageLinksForCell(a,c.model.getChildAt(b,k))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var g=c.actions[e];null!=g.open&&"data:page/id,"==g.open.substring(0,
-13)&&(d=a[g.open.substring(g.open.indexOf(",")+1)],null!=d?g.open="data:page/id,"+d:delete g.open)}b="data:action/json,"+JSON.stringify(c)}}catch(u){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);
-try{var g="UNKNOWN-VISIO",f=e.lastIndexOf(".");if(0<=f&&f<e.length)g=e.substring(f+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:g+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(y){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",a,e);var k=new XMLHttpRequest;
-k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(B){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(z){c(z)}else c({})});k.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(y){c(y)}}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(p){c(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&
-console.error(p),c(p)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,g=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
-!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var g=parseFloat(b[0].getAttribute("width")),f=parseFloat(b[0].getAttribute("height"));if(isNaN(g)||isNaN(f))try{var m=b[0].getAttribute("viewBox").split(/\s+/),
-g=parseFloat(m[2]),f=parseFloat(m[3])}catch(A){g=g||100,f=f||100}c(d.convertDataUri(Editor.createSvgDataUri(a)),g,f)}else e({message:mxResources.get("invalidInput")})}catch(A){e(A)}})}catch(u){e(u)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?g():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,b,d){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&
-15)<<2|d>>6;c4=d&63;r="";r+=g(c1&63);r+=g(c2&63);r+=g(c3&63);return r+=g(c4&63)}function g(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 f=new XMLHttpRequest;f.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),
-0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(f.responseType="blob");f.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,g=b.height;if(0==a&&0==g){var f=d.result,m=f.indexOf(","),k=decodeURIComponent(escape(atob(f.substring(m+1)))),l=mxUtils.parseXml(k).getElementsByTagName("svg");
-0<l.length&&(a=parseFloat(l[0].getAttribute("width")),g=parseFloat(l[0].getAttribute("height")))}c(d.result,a,g)}catch(F){e(F)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};f.onerror=function(a){e(a)};f.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=
-function(a,b,c,e,f,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=
-this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var g=Editor.extractGraphModelFromPdf(a);if(null!=g&&0<g.length)return this.importXml(g,b,c,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(g=this.extractGraphModelFromPng(a),null!=g&&0<g.length))return this.importXml(g,b,c,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):
-g=decodeURIComponent(a.substring(a.indexOf(",")+1));var m=this.importXml(g,b,c,k,!0);if(0<m.length)return m}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var g=
-Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),f=Math.round(e.width*g);e=Math.round(e.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(g),
-d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),
-null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;d.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=d.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&d.setLinkForCell(f,
-f.value);f.geometry.width+=d.gridSize;f.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};
-EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display=
-"none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,
-0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,v,x,y){x=null!=x?x:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
-a,l)):b=this.importXml(a,c,e,x);null!=q&&q(b)});"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,x),v=!0)),v||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),x&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,m)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(v,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=v?(d=!0,this.importZipFile(v,
-m,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,x,y,A){e=null!=e?e:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,
-p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var t=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var p=a.length,z=p,t=[],B=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--z){this.spinner.stop();if(null!=q)q(t);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<t.length;c++){var e=t[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),v=0;v<p;v++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,
-9)){var p=a.target.result,z=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(z+1)))),q=mxUtils.parseXml(t),t=q.getElementsByTagName("svg");if(0<t.length){var t=t[0],v=A?null:t.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=
-q){var a=q.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),t=g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var v=B.split(" ");3<v.length&&(l=parseFloat(v[2]),t=parseFloat(v[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var u=Math.min(1,Math.min(e/Math.max(1,
-l)),e/Math.max(1,t)),C=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*u)),Math.max(1,Math.round(t*u)),k.name);if(isNaN(l)||isNaN(t)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);t=Math.max(1,x.height);C[0].geometry.width=l;C[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[C[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):
-B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var u=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=u&&0<u.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(u,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
-mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,p){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var z=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/p)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*z),Math.round(p*z),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(v)});if(m){m=[];
-for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;t()},v)}else t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,f,k){f=null!=f?f:this.maxImageSize;var d=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var m=Math.max(d/f,g/f);if(1<m){var l=Math.round(d/m),n=Math.round(g/m),p=document.createElement("canvas");
-p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var z=p.toDataURL();if(z.length<b.length){var t=document.createElement("canvas");t.width=l;t.height=n;var C=t.toDataURL();z!==C&&(b=z,d=l,g=n)}}}catch(D){}c(b,d,g)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);
-d.src=a}catch(p){if(null!=c)c(p);else throw p;}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+
-":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,g,k){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+e+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(e),[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=g,m.height=k,c.cellsResized([b],[m],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{c.getModel().endUpdate()}},
-function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};c.cellEditor.editMermaidData=function(b,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[b]);var m=c.model.getGeometry(b);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
-g),m.height=Math.max(m.height,k),c.cellsResized([b],[m],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,d){try{var f=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=f)this.editPlantUmlData(b,d,f);else if(f=this.graph.getAttributeForCell(b,"mermaidData"),
-null!=f)this.editMermaidData(b,d,f);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):e.apply(this,arguments)}}catch(E){a.handleError(E)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(C){a.handleError(C)}return d};var f=this.clearDefaultStyle;this.clearDefaultStyle=function(){f.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?
-"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,d){var e=b;b=function(a,b){if(null==b){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(b=d.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=e&&e(a,b)};l.call(this,a,b,d)};b.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,
-null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var u=c.getExportVariables;c.getExportVariables=function(){var b=u.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,
-a.currentPage)+1:1;return b};var q=c.getGlobalVariable;c.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var v=c.labelLinkClicked;c.labelLinkClicked=function(a,b,d){var e=b.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&
-mxEvent.isPopupTrigger(d))v.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(e),c.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/
-2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&
-(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=
-a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
-mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));
-var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:y.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,
-function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&
-(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),
-b=document.createElement("div");b.innerHTML=c.sanitizeHtml(m);var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),null==m&&(m=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(l=!0)):(d=b.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(m=mxUtils.getTextContent(b[0]))));var n=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,g,!0,
-l,null,n))});l&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-k+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",
-mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var g=f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=
-this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(v){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck",
-"false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",
-b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),
-0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c,!0),a()}catch(u){this.handleError(u)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&
-this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==
-a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=
-function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
-mxUtils.bind(this,function(a,b){var d=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();
-this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,
-b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=
-function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=
-a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[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&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,g==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,g),f=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(d,
-g),f=!1));f&&Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))c=k[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,
-b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var k=d.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):
-decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(C){}try{var n=this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var A=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,A,A));else if(e&&1==n.getSelectionCount()){var z=n.getStartEditingCell(n.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_IMAGE,
-f,[z]):(n.labelChanged(z,f),Graph.isLink(f)&&n.setLinkForCell(z,f));n.setSelectionCell(z)}else{var B=n.getInsertPoint();n.isMouseInsertPoint()&&(A=0,n.lastPasteXml==f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,B.x+A,B.y+A,!0))}n.isSelectionEmpty()||(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:
-a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=this.editor.graph.sanitizeHtml(d),c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),
-null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?
-EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var f=document.documentElement;c=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=d+"px";f.style.width=Math.max(0,c-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFileHandle=function(a,b,c,e,f){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var d=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":
-b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,
-mxUtils.bind(this,function(a){this.spinner.stop();d(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(c,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?d(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,
-b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,c.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if(0==
-a.indexOf("PK"))this.importZipFile(c,mxUtils.bind(this,function(a){this.spinner.stop();d(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==c.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==c.type){var g=Editor.extractGraphModelFromPdf(a);null!=g&&(a=g)}this.spinner.stop();this.openLocalFile(a,b,e,f,null!=f?c:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
-0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,a.name,a,b)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c,e,f){var d=this.getCurrentFile(),
-g=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c,e,f))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?g():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.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(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.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 a={};if(null!=this.pages)for(var b=
-0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&
-(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
-a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,
-!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,
-c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
-a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?
-mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),
-"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){var n=m(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),
-"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();
-var p=1==g.enableRecent,t=1==g.enableSearch,q=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,
-"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();
-return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var u=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||
-g.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var H=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=
-g;b.data=a;b.xml=H;k.postMessage(JSON.stringify(b),"*")}),G=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(H)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),
-J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}I.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=I.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),
-null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(H))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):G(null)}),mxUtils.bind(this,
-function(){G(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);u=this.createLoadMessage("export");u.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();u.xml=mxUtils.getXml(ca);u.data=this.getFileData(null,null,!0,null,null,null,ca);u.format=g.format}else if("html"==g.format)H=this.editor.getGraphXml(),u.data=this.getHtml(H,this.editor.graph),u.xml=mxUtils.getXml(H),u.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=
-null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);u.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);u.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=Editor.createSvgDataUri(a);k.postMessage(JSON.stringify(u),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(u.xml,this.editor.graph,null,
-!0,V,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var U=this.editor.graph.getSvg(Y);this.embedFonts(U,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){V(mxUtils.getXml(a))})):V(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(u),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),
-null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop=
-"6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=this.getCurrentFile();null!=Z&&(n=m(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,
-n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,
-function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,
-b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||
-"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,
-"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom=
-"2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",
-mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,
-mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=
-new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);
-if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var g={},k=null,l=null,x=null,y=null,A=null,z=null,B=null,C=null,D="",E="auto",F="auto",H=null,I=null,K=40,G=40,L=100,O=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(ka):(J.setSelectionCells(ka),J.scrollCellToVisible(J.getSelectionCell()))},
-W=J.getFreeInsertPoint(),aa=W.x,ca=W.y,W=ca,Y=null,V="auto",C=null,U=[],Z=null,ba=null,T=0;T<d.length&&"#"==d[T].charAt(0);){a=d[T];for(T++;T<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[T].substring(1)),T++;if("#"!=a.charAt(1)){var P=a.indexOf(":");if(0<P){var Q=mxUtils.trim(a.substring(1,P)),M=mxUtils.trim(a.substring(P+1));"label"==Q?Y=J.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?y=M:"labels"==Q&&0<M.length&&"-"!=M?A=JSON.parse(M):
-"style"==Q?k=M:"parentstyle"==Q?z=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?C=M:"namespace"==Q&&0<M.length&&"-"!=M?D=M:"width"==Q?E=M:"height"==Q?F=M:"left"==Q&&0<M.length?H=M:"top"==Q&&0<M.length?I=M:"ignore"==Q?ba=M.split(","):"connect"==Q?U.push(JSON.parse(M)):"link"==Q?Z=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?G=parseFloat(M):"levelspacing"==
-Q?L=parseFloat(M):"layout"==Q&&(V=M)}}}if(null==d[T])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(d[T]),Q=P=null,M=[],R=0;R<ga.length;R++)B==ga[R]&&(P=R),C==ga[R]&&(Q=R),M.push(mxUtils.trim(ga[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=U)for(var X=0;X<U.length;X++)null==g[U[X].to]&&(g[U[X].to]={});B=[];for(R=T+1;R<d.length;R++){var da=this.editor.csvToArray(d[R]);if(null==da){var sa=40<d[R].length?
-d[R].substring(0,40)+"...":d[R];throw Error(sa+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&B.push(da)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var da=B[R],N=null,ia=null!=P?D+da[P]:null;null!=ia&&(N=J.model.getCell(ia));var d=null!=N,fa=new mxCell(Y,new mxGeometry(aa,W,0,0),k||"whiteSpace=wrap;html=1;");fa.vertex=!0;fa.id=ia;for(var ea=0;ea<da.length;ea++)J.setAttributeForCell(fa,M[ea],da[ea]);if(null!=y&&null!=A){var ja=A[fa.getAttribute(y)];null!=ja&&J.labelChanged(fa,
-ja)}if(null!=x&&null!=l){var oa=l[fa.getAttribute(x)];null!=oa&&(fa.style=oa)}J.setAttributeForCell(fa,"placeholders","1");fa.style=J.replacePlaceholders(fa,fa.style);d&&(J.model.setGeometry(N,fa.geometry),J.model.setStyle(N,fa.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=fa;if(!d)for(X=0;X<U.length;X++)g[U[X].to][N.getAttribute(U[X].to)]=N;null!=Z&&"link"!=Z&&(J.setLinkForCell(N,N.getAttribute(Z)),J.setAttributeForCell(N,Z,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ha=
-this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=H&&null!=N.getAttribute(H)&&(N.geometry.x=aa+parseFloat(N.getAttribute(H))),null!=I&&null!=N.getAttribute(I)&&(N.geometry.y=ca+parseFloat(N.getAttribute(I))),"@"==E.charAt(0)&&null!=N.getAttribute(E.substring(1))?N.geometry.width=parseFloat(N.getAttribute(E.substring(1))):N.geometry.width="auto"==E?ha.width+O:parseFloat(E),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.height=parseFloat(N.getAttribute(F.substring(1))):
-N.geometry.height="auto"==F?ha.height+O:parseFloat(F),W+=N.geometry.height+G);d?(null==f[ia]&&(f[ia]=[]),f[ia].push(N)):(C=null!=Q?J.model.getCell(D+da[Q]):null,c.push(N),null!=C?(C.style=J.replacePlaceholders(C,z),J.addCell(N,C)):e.push(J.addCell(N)))}for(var ma=e.slice(),ka=e.slice(),X=0;X<U.length;X++)for(var ua=U[X],R=0;R<c.length;R++){var N=c[R],va=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(J.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=
-0;e<c.length;e++){var f=g[d.to][c[e]];if(null!=f){var k=d.label;null!=d.fromlabel&&(k=(b.getAttribute(d.fromlabel)||"")+(k||""));null!=d.tolabel&&(k=(k||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?J.replacePlaceholders(l,d.style):J.createCurrentEdgeStyle(),k=J.insertEdge(null,null,k||"",d.invert?f:a,d.invert?a:f,l);if(null!=d.labels)for(l=0;l<d.labels.length;l++){var m=d.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?
-m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}ka.push(k);mxUtils.remove(d.invert?a:f,ma)}}});va(N,N,ua);if(null!=f[N.id])for(ea=0;ea<f[N.id].length;ea++)va(N,f[N.id][ea],ua)}if(null!=ba)for(R=0;R<c.length;R++)for(N=c[R],ea=0;ea<ba.length;ea++)J.setAttributeForCell(N,mxUtils.trim(ba[ea]),null);if(0<e.length){var la=new mxParallelEdgeLayout(J);la.spacing=K;
-var ta=function(){0<la.spacing&&la.execute(J.getDefaultParent());for(var a=0;a<e.length;a++){var b=J.getCellGeometry(e[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==E&&(b.width=Math.round(J.snap(b.width)));"auto"==F&&(b.height=Math.round(J.snap(b.height)))}};if("["==V.charAt(0)){var wa=S;J.view.validate();this.executeLayoutList(JSON.parse(V),function(){ta();wa()});S=null}else if("circle"==V){var na=new mxCircleLayout(J);na.resetEdges=!1;var xa=na.isVertexIgnored;na.isVertexIgnored=
-function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(J.getDefaultParent());ta()},!0,S);S=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&ka.length==2*e.length-1&&1==ma.length){J.view.validate();var ra=new mxCompactTreeLayout(J,"horizontaltree"==V);ra.levelDistance=G;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,S);S=null}else if("horizontalflow"==
-V||"verticalflow"==V||"auto"==V&&1==ma.length){J.view.validate();var pa=new mxHierarchicalLayout(J,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=G;pa.parallelEdgeSpacing=K;pa.interRankCellSpacing=L;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(J.getDefaultParent(),ka);J.moveCells(ka,aa,ca)},!0,S);S=null}else if("organic"==V||"auto"==V&&ka.length>e.length){J.view.validate();var qa=new mxFastOrganicLayout(J);qa.forceConstant=3*G;qa.resetEdges=
-!1;var ya=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(J);la.spacing=K;this.executeLayout(function(){qa.execute(J.getDefaultParent());ta()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>
-mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};
-EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,
-0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,
-arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=
-function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=
-mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&
-"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());
-this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);
-this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){f.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
-this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);l.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
-function(a,b,c,e,f,k,l){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,f,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),m=d.getGraphBounds(),n=Math.floor(m.width*f/d.view.scale),p=Math.floor(m.height*f/d.view.scale);if(g.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var z=
-{globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<l?"&dpi="+l:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(g))})}else"png"==c?a.exportImage(f,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,l):a.exportImage(f,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
-EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=
-function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var f={};try{var k=mxSettings.getCustomLibraries();
-for(a=0;a<k.length;a++){var l=k[a];if("R"==l.substring(0,1)){var v=JSON.parse(decodeURIComponent(l.substring(1)));f[v[0]]={id:v[0],title:v[1],downloadUrl:v[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);
-(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
-var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));
-0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=
-null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,f){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);d&&e.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(g);d&&f.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",
-funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=
-!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=
-function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=b&&b(u)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;
-this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);
-var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",
-functionArgs:[a]}),"*"):k()}),k)}}catch(F){console.log(F)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(F){console.log(F)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(H){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(H){console.log(H)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,f){this.openDatabase(mxUtils.bind(this,
-function(d){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=d.transaction(f,"readwrite");g.oncomplete=c;g.onerror=e;for(d=0;d<f.length;d++)g.objectStore(f[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),
-c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==
-b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():
-!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(a,b,c,e,f,k,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,c,e,f,k,l,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,
-b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,c,e,f,k,l,q,v,x,y,A,z,B,C,D){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,c,e,f,k,l,q,v,x,y,A,z,B,C,D)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(a,b,c,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,c,e,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=
-localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var f="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(f||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===
-b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,e,c,b,k,f){function l(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;z.style.display=0==b?"block":"none"}function d(a,b,c,d){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),l()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function g(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function m(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function n(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function t(b,c,e,f,k){function B(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});I.appendChild(e);d&&(e.style.display="none")}function C(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function G(c,e,g,k,l){function z(){m(u);b.addReply(q,function(a){q.id=a;b.replies.push(q);p(u);g&&g()},function(b){B();n(u);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,l)}function B(){d(q,u,function(a){z()},!0)}var v=C().pdiv,q=a.newComment(c,a.getCurrentUser());q.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=t(q,b.replies,v,f+1);e?B():z()}if(k||!b.isResolved){z.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
-var y=document.createElement("div");y.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;y.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";y.appendChild(E);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");E.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);g(b,
-F);E.appendChild(F);x.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");x.appendChild(y);b.isLocked&&(x.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var I=document.createElement("ul");I.className="geCommentActionsList";y.appendChild(I);u||b.isLocked||0!=f&&!q||B(mxResources.get("reply"),function(){G("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||u||b.isLocked||(B(mxResources.get("edit"),
-function(){function c(){d(b,x,function(){m(x);b.editComment(b.content,function(){p(x)},function(b){n(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){m(x);b.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var d=x.querySelectorAll(".geCommentAction");for(a=
-0;a<d.length;a++)d[a].parentNode.removeChild(d[a]);p(x);x.style.opacity="0.5"}else{d=C(b).replies;for(a=0;a<d.length;a++)A.removeChild(d[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}z.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){n(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||B(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=d);D||(e[g].style.display="none")}l()}b.isResolved?G(mxResources.get("reOpened")+": ",!0,c,!1,
-!0):G(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(y);null!=e?A.insertBefore(x,e.nextSibling):A.appendChild(x);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,t(y,b.replies,null,f+1,k);null!=v&&(v.comment.id==b.id?(k=b.content,b.content=v.comment.content,d(b,x,v.saveCallback,v.deleteOnCancel),b.content=k):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return x}}var u=
-!a.canComment(),q=a.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(y)+7+"px";x.appendChild(A);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(z,mxResources.get("noCommentsFound"));var B=document.createElement("div");B.className="geToolbarContainer geCommentsToolbar";B.style.height=y;B.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(B.style.filter="none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var C=y.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){d(e,f,function(b){m(f);a.addComment(b,function(a){b.id=a;E.push(b);p(f)},function(b){n(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=t(e,E,null,0);c();b.preventDefault();mxEvent.consume(b)});B.appendChild(C)}C=y.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
-C.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";F();a.preventDefault();mxEvent.consume(a)});B.appendChild(C);a.commentsRefreshNeeded()&&(C=y.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),
-mxEvent.addListener(C,"click",function(a){F();a.preventDefault();mxEvent.consume(a)}),B.appendChild(C));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),B.appendChild(y));x.appendChild(B);var E=[],F=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(G){a.handleError(G)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(z);z.style.display="block";E=a;for(a=0;a<E.length;a++)b(E[a].replies),t(E[a],E,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),d(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
-(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;B=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(g(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<E.length;d++)a(E[d])}});setInterval(B,6E4);this.refreshCommentsTime=
-B;this.window=new mxWindow(mxResources.get("comments"),x,e,c,b,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,l){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{l?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(C){}if(null!=k||null!=b){l=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),
+p=null;b=null!=b?b:mxResources.get("error");if(null!=k){null!=k.retry&&(m=mxResources.get("cancel"),p=function(){e();k.retry()});if(404==k.code||404==k.status||403==k.code){l=403==k.code?null!=k.message?mxUtils.htmlEntities(k.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var n=null!=g?g: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!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==k.code||404==k.status)){n="#U"==n.substring(0,2)?n.substring(45,n.lastIndexOf("%26ex")):n.substring(2);this.showError(b,l,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
+n);this.handleError(a,b,c,d,f)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var e=document.createElement("option");mxUtils.write(e,b[a].displayName);e.value=a;d.appendChild(e);e=document.createElement("option");e.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(e,"<"+b[a].email+">");e.setAttribute("disabled","disabled");d.appendChild(e)}e=document.createElement("option");mxUtils.write(e,mxResources.get("addAccount"));e.value=b.length;
+d.appendChild(e)}var b=this.drive.getUsersList(),e=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");e.appendChild(c);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var e=d.value,c=b.length!=e;c&&this.drive.setUser(b[e]);this.drive.authorize(c,mxUtils.bind(this,function(){c||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
+!0)}));e.appendChild(d);e=new CustomDialog(this,e,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(e.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=k.message?l=mxUtils.htmlEntities(k.message):null!=k.response&&null!=k.response.error?l=mxUtils.htmlEntities(k.response.error):"undefined"!==typeof window.App&&(k.code==App.ERROR_TIMEOUT?l=mxUtils.htmlEntities(mxResources.get("timeout")):
+k.code==App.ERROR_BUSY&&(l=mxUtils.htmlEntities(mxResources.get("busy"))))}var q=g=null;null!=k&&null!=k.helpLink&&(g=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(k.helpLink)}));this.showError(b,l,m,c,p,null,null,g,q,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b,c){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,c||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,c,d,
+f,g){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f,null,null,null,null,k);this.showDialog(a.container,340,46+k,!0,g);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var e=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var d=document.createElement("div");
+d.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(d.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.className="geBtn gePrimaryBtn";e=document.createElement("img");e.setAttribute("src",IMAGE_PATH+
+"/logo.png");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";d.appendChild(e);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;";d.appendChild(e);mxUtils.write(d,b);document.body.appendChild(d);
+this.bannerShowing=!0;var k=document.createElement("div");k.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","geDoNotShowAgainCheckbox");f.style.marginRight="6px";k.appendChild(f);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));k.appendChild(b);d.style.paddingBottom="30px";d.appendChild(k);var m=mxUtils.bind(this,
+function(){null!=d.parentNode&&(d.parentNode.removeChild(d),this.bannerShowing=!1,f.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);m()}));var g=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(d,"click",
+mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);e!=f&&e!=b?(null!=c&&c(),m(),mxEvent.consume(a)):g()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(g,3E4);e=!0}return e};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
+EditorUi.prototype.createImageDataUri=function(a,b,c,d){var e=a.toDataURL("image/"+c);if(6>=e.length||e==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(b)));0<d&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",d));return e};EditorUi.prototype.saveCanvas=function(a,b,c,d,f){var e="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+e;a=this.createImageDataUri(a,b,c,f);this.saveData(d,e,a.substring(a.lastIndexOf(",")+
+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var e=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));e.textarea.style.width="600px";e.textarea.style.height="380px";this.showDialog(e.container,
+620,460,!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f,g){"text/xml"!=c||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=g?g:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),
+c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a");g=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof e.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var k=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);g=65==(k?parseInt(k[2],10):
+!1)?!1:g}if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));g?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},2E4),e.click(),e.parentNode.removeChild(e)}catch(y){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var e=atob(a),c=e.length,d=Math.ceil(c/1024),k=Array(d),f=0;f<d;++f){for(var g=1024*f,l=Math.min(g+1024,c),n=Array(l-g),A=0;g<l;++A,++g)n[A]=e[g].charCodeAt(0);k[f]=new Uint8Array(n)}return new Blob(k,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,l,n){g=null!=g?g:!1;l=null!=l?l:"vsdx"!=
+f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d,null,n):null!=b&&0<b.length&&
+this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(C){this.handleError(C)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,l,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var e=window.open("about:blank");null==e||null==e.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?"image/svg+xml"==b?e.document.write("<html>"+a+"</html>"):(a=c?a:btoa(unescape(encodeURIComponent(a))),e.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):e.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),e.document.close())};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var e=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var c=e.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+c.zIndex;var d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var e=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",e);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(e.substring(e.indexOf(",")+1),"image/png",!0);b.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",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g,l){l=null!=l?l:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&
+e++;var k=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,e,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,l,null,1<e,k,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,
+380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,l,n,y,x,A){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var k=b?null:this.editor.graph.background;k==mxConstants.NONE&&
+(k=null);null==k&&0==b&&(k=A?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var m=this.editor.graph.getSvg(k,a,l,n,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,A);d&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,q,this.thumbImageCache)):q(m)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=
+function(a,b,c,d,f,g,l){return this.addCheckbox(a,c,d,f,g,l,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g,l,n){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",l?"radio":"checkbox");l="geCheckbox-"+Editor.guid();e.id=l;null!=n&&e.setAttribute("name",n);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c,
+b),c.setAttribute("for",l),a.appendChild(c),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=function(a,b){var e=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);e.style.marginLeft="24px";var c=this.getCurrentFile(),d="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option");
+c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,
+300,80,!0,!1);a.init()}}));mxEvent.addListener(e,"change",mxUtils.bind(this,function(){e.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return e.checked?"blank"===f.value?"_blank":d:null},getEditInput:function(){return e},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function e(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?
+"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");
+d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(d));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=
+null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;e()});mxEvent.consume(a)}));e();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};
+EditorUi.prototype.createUrlParameters=function(a,b,c,d,f,g,l){l=null!=l?l:[];d&&("1"==urlParams.dev&&l.push("lightbox=1"),"auto"!=a&&l.push("target="+a),null!=b&&b!=mxConstants.NONE&&l.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&l.push("edit="+encodeURIComponent(f)),g&&l.push("layers=1"),this.editor.graph.foldingEnabled&&l.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&l.push("page-id="+this.currentPage.getId());return l};
+EditorUi.prototype.createLink=function(a,b,c,d,f,g,l,n,y){y=null!=y?y:this.createUrlParameters(a,b,c,d,f,g);a=this.getCurrentFile();b=!0;null!=l?c="#U"+encodeURIComponent(l):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+
+encodeURIComponent(a.getTitle()));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,l,n,y,x,A){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);y||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);
+isNaN(c)||100==c||(e.zoom=c/100);c=[];l&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);n&&c.push("layers");0<c.length&&(y&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+
+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";A(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");f=m.cloneNode(!0);f.setAttribute("value",
+"copy");k.appendChild(f);var g=document.createElement("span");mxUtils.write(g,mxResources.get("includeCopyOfMyDiagram"));k.appendChild(g);mxUtils.br(k);k.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("publicDiagramUrl"));k.appendChild(g);var l=this.getCurrentFile();null==c&&null!=l&&l.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")),k.appendChild(g),
+mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==c&&m.setAttribute("disabled","disabled");e.appendChild(k);var p=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=
+"100%";e.appendChild(z);var C=this.addCheckbox(e,mxResources.get("fit"),!0),k=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(e,mxResources.get("allPages"),k,!k),F=this.addCheckbox(e,mxResources.get("layers"),!0),E=this.addCheckbox(e,mxResources.get("lightbox"),!0),H=this.addEditButton(e,E),J=H.getEditInput();J.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");J.checked&&E.checked?H.getEditSelect().removeAttribute("disabled"):
+H.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(m.checked?c:null,n.checked,z.value,p.getTarget(),p.getColor(),C.checked,D.checked,F.checked,E.checked,H.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g,l){l=document.createElement("div");l.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,a||mxResources.get("link"));e.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(e);var k=this.getCurrentFile(),e="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var e="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace=
+"normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())}));p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);l.appendChild(m);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));m.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(l,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight=
+"16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",l.appendChild(n),mxUtils.write(l,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=d+"px",l.appendChild(q),mxUtils.br(l);var u=this.addLinkSection(l,g);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==k||k.constructor!=window.DriveFile||b)t=
+this.addCheckbox(l,mxResources.get("allPages"),c,!c);var F=this.addCheckbox(l,mxResources.get("lightbox"),!0,null,null,!g),E=this.addEditButton(l,F),H=E.getEditInput();g&&(H.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var J=this.addCheckbox(l,mxResources.get("layers"),!0);J.style.marginLeft=H.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(J.removeAttribute("disabled"),H.removeAttribute("disabled")):(J.setAttribute("disabled",
+"disabled"),H.setAttribute("disabled","disabled"));H.checked&&F.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,l,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==t?!0:t.checked,F.checked,E.getLink(),J.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),e);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxResources.get("image"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(k);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type",
+"text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";e.appendChild(m);mxUtils.write(e,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";e.appendChild(g);mxUtils.br(e)}var l=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+p=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),k=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),k.background==mxConstants.NONE||null==k.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(m.value)/100||1,b=parseInt(g.value)||0;c(!l.checked,null!=p?p.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,c,d,f,g,l,n){l=null!=l?l:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph,m="jpeg"==n?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(p);mxUtils.write(e,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%";e.appendChild(q);mxUtils.write(e,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";e.appendChild(v);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),t=null;"dark"==uiTheme&&(t=this.addCheckbox(e,mxResources.get("dark"),!0),m+=26);var E=this.addCheckbox(e,
+mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.style.marginLeft="24px";H.setAttribute("disabled","disabled");H.setAttribute("type","checkbox");g&&(e.appendChild(H),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),m+=26,mxEvent.addListener(E,"change",function(){E.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}));k.isSelectionEmpty()||(H.setAttribute("checked","checked"),
+H.defaultChecked=!0);var J=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||I.setAttribute("disabled","disabled");b&&(e.appendChild(I),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),m+=26);var G=null;if("png"==n||"jpeg"==n)G=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),m+=26;var M=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=n),N=null!=this.pages&&1<this.pages.length,L=this.addCheckbox(e,N?mxResources.get("allPages"):"",N,!N,null,"jpeg"!=n);L.style.marginLeft="24px";L.style.marginBottom="16px";N?m+=26:L.style.display="none";mxEvent.addListener(M,"change",function(){M.checked&&N?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")});l&&N||L.setAttribute("disabled","disabled");var K=document.createElement("select");
+K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginRight="10px";K.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));K.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));K.appendChild(a);"svg"==
+n&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(K),mxUtils.br(e),mxUtils.br(e),m+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;f(q.value,u.checked,!E.checked,J.checked,M.checked,I.checked,v.value,H.checked,!L.checked,K.value,null!=G?G.checked:null,null!=t?t.checked:null)}),null,c,d);this.showDialog(c.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var k=this.editor.graph;if(null!=b){var m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(m)}var g=this.addCheckbox(e,mxResources.get("fit"),!0),l=this.addCheckbox(e,mxResources.get("shadow"),k.shadowVisible&&d,
+!d),p=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),q=this.addEditButton(e,n),C=q.getEditInput(),D=1<k.model.getChildCount(k.model.getRoot()),F=this.addCheckbox(e,mxResources.get("layers"),D,!D);F.style.marginLeft=C.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(D&&F.removeAttribute("disabled"),C.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));
+C.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(g.checked,l.checked,p.checked,n.checked,q.getLink(),F.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,l,n){function e(b){var e=" ",m="";d&&(e=" 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"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");a&&(m+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(k.width)+'" height="'+Math.round(k.height)+'"');l('<img src="'+b+'"'+p+(""!=m?' style="'+m+'"':"")+e+"/>")}var k=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");e(a)}),null,null,null,
+mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),k.width*k.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var m="";c&&(m="&w="+Math.round(2*k.width)+"&h="+Math.round(2*k.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?e("data:image/png;base64,"+
+p.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,l){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),k=e.getElementsByTagName("a");if(null!=k)for(var m=0;m<k.length;m++){var p=k[m].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==k[m].getAttribute("target")&&k[m].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));
+b&&this.editor.graph.addSvgShadow(e);if(c){var n=" ",q="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&
+(q+="max-width:100%;");this.editor.convertImages(e,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(e.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"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=q&&e.setAttribute("style",q),this.editor.addFontCss(e),this.editor.graph.mathEnabled&&this.editor.addMathCss(e),l(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var e=null;if("diagram"==a.nodeName)e=a;else if("mxfile"==
+a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var e=c[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?e.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=e&&(a=Editor.parseDiagramNode(e))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=c}return a};EditorUi.prototype.getPngFileProperties=function(a){var b=1,e=0;if(null!=a){if(a.hasAttribute("scale")){var c=
+parseFloat(a.getAttribute("scale"));!isNaN(c)&&0<c&&(b=c)}a.hasAttribute("border")&&(c=parseInt(a.getAttribute("border")),!isNaN(c)&&0<c&&(e=c))}return{scale:b,border:e}};EditorUi.prototype.getEmbeddedPng=function(a,b,c,d,f){try{var e=this.editor.graph,k=null!=e.themes&&"darkTheme"==e.defaultThemeName,m=null;if(null!=c&&0<c.length)e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,
+!0),e),m=c;else if(k||null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),g=e.getGlobalVariable,l=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(l.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(c){try{null==m&&(m=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var d=c.toDataURL("image/png"),d=Editor.writeGraphModelToPng(d,
+"tEXt","mxfile",encodeURIComponent(m));a(d.substring(d.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(z){null!=b&&b(z)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,d,null,e.shadowVisible,null,e,f)}catch(A){null!=b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,l,n){n=null!=n?n:!0;l=b.background;l==mxConstants.NONE&&(l=null);g=b.getSvg(l,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&
+g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(e){try{null!=e&&this.editor.addFontCss(a,e),b(a)}catch(p){b(a)}}))}catch(m){b(a)}}))};
+EditorUi.prototype.exportImage=function(a,b,c,d,f,g,l,n,y,x,A,B){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,n):null,y,null==this.pages||0==this.pages.length,A)}catch(D){"Invalid image"==D.message?this.downloadFile(y):
+this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,l,x,B)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=b?b:0;c=null!=c?c:0;var e=[];try{var k=this.editor.graph;if(null!=a&&0<a.length){k.model.beginUpdate();try{var m=mxUtils.parseXml(a);a={};
+var g=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=g&&"mxfile"==g.nodeName&&null!=this.pages){var l=g.getElementsByTagName("diagram");if(1==l.length)g=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(a[l[0].getAttribute("id")]=this.currentPage.getId());else if(1<l.length){var m=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[l[0].getAttribute("id")]=this.pages[0].getId(),g=Editor.parseDiagramNode(l[0]),d=!1,n=1);for(;n<l.length;n++){var p=
+l[n].getAttribute("id");l[n].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(l[n]));a[p]=l[n].getAttribute("id");var C=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[C+1]));k.model.execute(new ChangePage(this,q,q,C,!0));m.push(q)}this.updatePageLinks(a,m)}}if(null!=g&&"mxGraphModel"===g.nodeName&&(e=k.importGraphModel(g,b,c,d),null!=e))for(n=0;n<e.length;n++)this.updatePageLinksForCell(a,e[n])}finally{k.model.endUpdate()}}}catch(D){if(f)throw D;this.handleError(D)}return e};
+EditorUi.prototype.updatePageLinks=function(a,b){for(var e=0;e<b.length;e++)this.updatePageLinksForCell(a,b[e].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var e=document.createElement("div"),c=this.editor.graph,d=c.getLinkForCell(b);null!=d&&c.setLinkForCell(b,this.updatePageLink(a,d));if(c.isHtmlLabel(b)){e.innerHTML=c.sanitizeHtml(c.getLabel(b));for(var f=e.getElementsByTagName("a"),k=!1,g=0;g<f.length;g++)d=f[g].getAttribute("href"),null!=d&&(f[g].setAttribute("href",this.updatePageLink(a,
+d)),k=!0);k&&c.labelChanged(b,e.innerHTML)}for(g=0;g<c.model.getChildCount(b);g++)this.updatePageLinksForCell(a,c.model.getChildAt(b,g))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var e=a[b.substring(b.indexOf(",")+1)];b=null!=e?"data:page/id,"+e:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));if(null!=c.actions){for(var d=0;d<c.actions.length;d++){var f=c.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
+13)&&(e=a[f.open.substring(f.open.indexOf(",")+1)],null!=e?f.open="data:page/id,"+e:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(t){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);
+try{var f="UNKNOWN-VISIO",k=d.lastIndexOf(".");if(0<=k&&k<d.length)f=d.substring(k+1).toUpperCase();else{var g=d.lastIndexOf("/");0<=g&&g<d.length&&(d=d.substring(g+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(A){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{e=new FormData;e.append("file1",a,d);var m=new XMLHttpRequest;
+m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var e=new FileReader;e.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});e.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(z){c(z)}else try{""==m.responseType||"text"==m.responseType?c({message:m.responseText}):
+(e=new FileReader,e.onload=function(){c({message:JSON.parse(e.result).Message})},e.readAsText(m.response))}catch(z){c({})}});m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(A){c(A)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});
+var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,c)}catch(q){c(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||
+this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(q){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(q){null!=window.console&&console.error(q),c(q)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generateMermaidImage=
+function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");
+if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),k=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(k))try{var g=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(g[2]),k=parseFloat(g[3])}catch(B){f=f||100,k=k||100}c(e.convertDataUri(Editor.createSvgDataUri(a)),f,k)}else d({message:mxResources.get("invalidInput")})}catch(B){d(B)}})}catch(t){d(t)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,e){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|e>>6;c4=e&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var k=new XMLHttpRequest;k.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(k.responseType="blob");k.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=
+b.width,f=b.height;if(0==a&&0==f){var k=e.result,g=k.indexOf(","),m=decodeURIComponent(escape(atob(k.substring(g+1)))),l=mxUtils.parseXml(m).getElementsByTagName("svg");0<l.length&&(a=parseFloat(l[0].getAttribute("width")),f=parseFloat(l[0].getAttribute("height")))}c(e.result,a,f)}catch(H){d(H)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};k.onerror=function(a){d(a)};k.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var e=this.editor.graph,d=null;e.getModel().beginUpdate();try{d=
+e.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),e.updateCellSize(d,!0)}finally{e.getModel().endUpdate()}return d};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,l){g=null!=g?g:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var e=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var k=Editor.extractGraphModelFromPdf(a);if(null!=k&&0<k.length)return this.importXml(k,b,c,g,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(k=this.extractGraphModelFromPng(a),null!=k&&0<k.length))return this.importXml(k,
+b,c,g,!0);if("data:image/svg+xml;"==a.substring(0,19))try{k=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(k=a.substring(a.indexOf(",")+1),k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0)):k=decodeURIComponent(a.substring(a.indexOf(",")+1));var m=this.importXml(k,b,c,g,!0);if(0<m.length)return m}catch(B){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",
+e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),k=Math.round(d.width*f);d=Math.round(d.height*f);e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),k,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,a,e.snap(b),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.updateCellSize(f),e.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{e.getModel().endUpdate()}e.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
+function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,g))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{e=this.editor.graph;f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,"",e.snap(b),e.snap(c),1,1,"text;whiteSpace=wrap;"+(d?"html=1;":""));e.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");
+f.value=a;e.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=e.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&e.setLinkForCell(f,f.value);f.geometry.width+=e.gridSize;f.geometry.height+=e.gridSize}finally{e.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};
+EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==
+this.importFileInputElt){var e=document.createElement("input");e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){null!=e.files&&(this.importFiles(e.files,null,null,this.maxImageSize),e.type="",e.type="file",e.value="")}));e.style.display="none";document.body.appendChild(e);this.importFileInputElt=e}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,
+function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var e=new Blob([a],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var d=this.dialog,f=d.close;this.dialog.close=
+mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var e=this,d=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(d){if(0==Object.keys(d.files).length)c();else{var f=0,k,g=!1;d.forEach(function(a,e){var d=e.name.toLowerCase();"diagram/diagram.xml"==d?(g=!0,e.async("string").then(function(a){0==
+a.indexOf("<mxfile ")?b(a):c()})):0==d.indexOf("versions/")&&(d=parseInt(d.substr(9)),d>f&&(f=d,k=e))});0<f?k.async("string").then(function(d){!e.isOffline()&&(new XMLHttpRequest).upload&&e.isRemoteFileFormat(d,a.name)?e.parseFile(new Blob([d],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):g||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?d():
+(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,l,n,y,x,A){x=null!=x?x:!0;var e=!1,k=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,d,x);null!=n&&n(b)});"image"==b.substring(0,5)?(y=!1,"image/png"==b.substring(0,9)&&(b=A?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(k=this.importXml(b,c,d,x),y=!0)),y||(b=this.editor.graph,
+A=a.indexOf(";"),0<A&&(a=a.substring(0,A)+a.substring(a.indexOf(",",A+1))),x&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),k=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,m)):null!=y&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(e=!0,this.importVisio(y,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a,l)?(e=!0,this.parseFile(null!=y?y:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=n&&n(null))}),l)):0==a.indexOf("PK")&&null!=y?(e=!0,this.importZipFile(y,m,mxUtils.bind(this,function(){k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x);n(k)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(k=this.insertTextAt(this.validateFileData(a),c,d,!0,null,
+x));e||null==n||n(k);return k};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,l,n,y,x,A,B){d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=b&&null!=c,k=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=A||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){m=!0;break}var v=mxUtils.bind(this,function(){var m=this.editor.graph,p=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,k,g,m,
+l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,f,k,g,m,l,e,B)}catch(O){return this.handleError(O),null}});g=null!=g?g:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,z=q,v=[],u=mxUtils.bind(this,function(a,b){v[a]=b;if(0==--z){this.spinner.stop();if(null!=n)n(v);else{var e=[];m.getModel().beginUpdate();try{for(var c=
+0;c<v.length;c++){var d=v[c]();null!=d&&(e=e.concat(d))}}finally{m.getModel().endUpdate()}}g(e)}}),t=0;t<q;t++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==l||l(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var n=a.target.result,q=n.indexOf(","),z=decodeURIComponent(escape(atob(n.substring(q+1)))),v=mxUtils.parseXml(z),z=v.getElementsByTagName("svg");if(0<z.length){var z=z[0],t=B?null:z.getAttribute("content");
+null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(t,!0)));null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t));null==t||"<mxfile "!==t.substring(0,8)&&"<mxGraphModel "!==t.substring(0,14)?u(e,mxUtils.bind(this,function(){try{if(n.substring(0,q+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var k=a[0],l=k.getAttribute("width"),z=k.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,z=null!=z&&"%"!=z.charAt(z.length-
+1)?parseFloat(z):NaN,B=k.getAttribute("viewBox");if(null==B||0==B.length)k.setAttribute("viewBox","0 0 "+l+" "+z);else if(isNaN(l)||isNaN(z)){var u=B.split(" ");3<u.length&&(l=parseFloat(u[2]),z=parseFloat(u[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(k));var t=Math.min(1,Math.min(d/Math.max(1,l)),d/Math.max(1,z)),C=f(n,g.type,b+e*p,c+e*p,Math.max(1,Math.round(l*t)),Math.max(1,Math.round(z*t)),g.name);if(isNaN(l)||isNaN(z)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);
+z=Math.max(1,x.height);C[0].geometry.width=l;C[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+l+" "+z);n=Editor.createSvgDataUri(mxUtils.getXml(k));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));m.setCellStyles("image",n,[C[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(k))}return C}}}catch(ba){}return null})):u(e,mxUtils.bind(this,function(){return f(t,"text/xml",b+e*p,c+e*p,0,0,g.name)}))}else u(e,mxUtils.bind(this,function(){return null}))}else{z=!1;if("image/png"==
+g.type){var C=B?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var D=new Image;D.src=a.target.result;u(e,mxUtils.bind(this,function(){return f(C,"text/xml",b+e*p,c+e*p,D.width,D.height,g.name)}));z=!0}}z||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,n){u(e,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var q=k&&this.isResampleImage(a.target.result,A)?Math.min(1,Math.min(d/l,d/n)):1;return f(m,g.type,b+e*p,c+e*p,Math.round(l*q),Math.round(n*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),k,d,A)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=
+a.target.result,f(n,g.type,b+e*p,c+e*p,240,160,g.name,function(a){u(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*p,c+e*p,240,160,g.name,function(a){u(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?n.readAsDataURL(g):n.readAsText(g)}})(t)});if(m){m=[];for(q=0;q<a.length;q++)m.push(a[q]);a=m;this.confirmImageResize(function(a){k=a;v()},y)}else v()};EditorUi.prototype.confirmImageResize=
+function(a,b){b=null!=b?b:!1;var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(c,d){if(c||b)mxSettings.setResizeImages(c?d:null),mxSettings.save();e();a(d)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var e=new FormData;e.append("format","xml");e.append("upfile",a,c);var d=new XMLHttpRequest;d.open("POST",OPEN_URL);d.onreadystatechange=function(){b(d)};d.send(e);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(u){}};EditorUi.prototype.isResampleImage=
+function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var m=Math.max(e/f,k/f);if(1<m){var l=Math.round(e/m),n=Math.round(k/m),p=document.createElement("canvas");p.width=l;p.height=n;p.getContext("2d").drawImage(a,0,0,l,n);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=l;u.height=
+n;var D=u.toDataURL();q!==D&&(b=q,e=l,k=n)}}}catch(F){}c(b,e,k)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var e=new Image;e.onload=function(){e.width=0<e.width?e.width:120;e.height=0<e.height?e.height:120;b(e)};null!=c&&(e.onerror=c);e.src=a}catch(q){if(null!=c)c(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;"dark"==uiTheme&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(e,c,d){var f=JSON.parse(d);c=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,f.format,function(d,g,k){a.spinner.stop();
+b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(e,"<pre>"+d+"</pre>"),b.updateCellSize(e,!0);else{b.setCellStyles("image",a.convertDataUri(d),[e]);var m=b.model.getGeometry(e);null!=m&&(m=m.clone(),m.width=g,m.height=k,b.cellsResized([e],[m],!1))}b.setAttributeForCell(e,"plantUmlData",JSON.stringify({data:c,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};b.cellEditor.editMermaidData=
+function(e,c,d){var f=JSON.parse(d);c=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(c,f.config,function(d,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",d,[e]);var m=b.model.getGeometry(e);null!=m&&(m=m.clone(),m.width=Math.max(m.width,g),m.height=Math.max(m.height,k),b.cellsResized([e],[m],!1));b.setAttributeForCell(e,"mermaidData",JSON.stringify({data:c,
+config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(e,d){try{var f=this.graph.getAttributeForCell(e,"plantUmlData");if(null!=f)this.editPlantUmlData(e,d,f);else if(f=this.graph.getAttributeForCell(e,"mermaidData"),null!=f)this.editMermaidData(e,d,f);else{var g=b.getCellStyle(e);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(e):
+c.apply(this,arguments)}}catch(E){a.handleError(E)}};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var e=!1;try{a.handleCustomLink(b),e=!0}catch(D){a.handleError(D)}return e};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
+/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var e=0;e<a.pages.length;e++)if(a.pages[e]==a.currentPage){0<e&&(b+=(0<b.length?"&":"?")+"page="+e);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,e,c){var d=
+e;e=function(a,e){if(null==e){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(e=c.getAttribute("href"))}null!=e&&b.isCustomLink(e)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(e)&&mxEvent.consume(a);null!=d&&d(a,e)};l.call(this,a,e,c)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?
+450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var n=b.getExportVariables;b.getExportVariables=function(){var b=n.apply(this,arguments),e=a.getCurrentFile();null!=e&&(b.filename=e.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var v=b.getGlobalVariable;b.getGlobalVariable=function(b){var e=a.getCurrentFile();return"filename"==
+b&&null!=e?e.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:v.apply(this,arguments)};var y=b.labelLinkClicked;b.labelLinkClicked=function(a,e,c){var d=e.getAttribute("href");if(null==d||!b.isCustomLink(d)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))y.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(d),
+b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,e=a.getCurrentFile();null!=e&&(b=null!=e.getTitle()?e.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
+function(a){var e=b.cellEditor.text2,c=null;null!=e&&(mxEvent.addListener(e,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(e));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,e,c,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var e=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)?this.loadImage(decodeURIComponent(e),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,
+Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.insertImage(decodeURIComponent(e),c*d,a*d)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&
+(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type",
+"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,b){if(0<this.editor.graph.getSelectionCount()){var e=this.editor.graph.getSelectionCell(),e=this.editor.graph.getModel().getStyle(e);this.styleInput.value=e||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var B=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(b.isEnabled()){var e=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,d=b.view.scale,f=e.x/d-c.x,g=e.y/d-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,e=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=e)b.setSelectionCells(this.importXml(e,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),e=document.createElement("div");e.innerHTML=b.sanitizeHtml(m);var l=null,c=e.getElementsByTagName("img");null!=c&&1==c.length?(m=c[0].getAttribute("src"),null==m&&(m=c[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||
+(l=!0)):(c=e.getElementsByTagName("a"),null!=c&&1==c.length?m=c[0].getAttribute("href"):(e=e.getElementsByTagName("pre"),null!=e&&1==e.length&&(m=mxUtils.getTextContent(e[0]))));var n=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,f,g,!0,l,null,n))});l&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;p()},mxEvent.isControlDown(a)):p()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,
+function(a){var e=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,e)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,e*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var e=b.clipboardData||b.originalEvent.clipboardData,c=!1,d=0;d<e.types.length;d++)if("text/"===e.types[d].substring(0,5)){c=!0;break}if(!c){var f=e.items;for(index in f){var g=
+f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,e,c,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
+"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(e){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(e){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(t){this.handleError(t)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var e=a.indexOf(",");0<e&&(b=this.getPageById(a.substring(e+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var e=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var e=this.editor.graph;if(e.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(e.model.getTopmostCells(e.getSelectionCells())),d=mxUtils.getXml(e.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(d));b?(e.removeCells(c,!1),e.lastPasteXml=
+null):(e.lastPasteXml=d,e.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,d){if(!mxEvent.isConsumed(a)){var e=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=e.getElementsByTagName("style");if(null!=g)for(;0<
+g.length;)g[0].parentNode.removeChild(g[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&&(g=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,g==e.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(e,g),f=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(e,g),f=!1));f&&Graph.removePasteFormatting(e)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(e=document.createElement("div"),mxUtils.setTextContent(e,g))}k=e.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===
+k[0].getAttribute("data-lucid-type"))c=k[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var e=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,e,e));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):
+e.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(D){}try{var k=e.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(D){}try{var n=this.editor.graph;if(null!=f&&0<f.length){n.lastPasteXml==f?n.pasteCounter++:(n.lastPasteXml=f,n.pasteCounter=0);var p=n.pasteCounter*n.gridSize;if(g||this.isCompatibleString(f))n.setSelectionCells(this.importXml(f,
+p,p));else if(d&&1==n.getSelectionCount()){var z=n.getStartEditingCell(n.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==n.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_IMAGE,f,[z]):(n.labelChanged(z,f),Graph.isLink(f)&&n.setLinkForCell(z,f));n.setSelectionCell(z)}else{var C=n.getInsertPoint();n.isMouseInsertPoint()&&(p=0,n.lastPasteXml==f&&0<n.pasteCounter&&n.pasteCounter--);n.setSelectionCells(this.insertTextAt(f,C.x+p,C.y+p,!0))}n.isSelectionEmpty()||
+(n.scrollCellToVisible(n.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(n.view.getState(n.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c||(n.lastPasteXml=null,n.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,e=0;e<a.length;e++)mxEvent.addListener(a[e],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),
+mxEvent.addListener(a[e],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[e],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var e=this.extractGraphModelFromEvent(a);if(null==e){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?e=c.getData("Text"):(e=null,e=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?
+c.getData("text/html"):null,null!=e&&0<e.length?(c=document.createElement("div"),c.innerHTML=this.editor.graph.sanitizeHtml(e),c=c.getElementsByTagName("img"),0<c.length&&(e=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(e=c.getData("text/plain"))),null!=e&&("data:image/png;base64,"==e.substring(0,22)?(e=this.extractGraphModelFromPng(e),null!=e&&0<e.length&&this.openLocalFile(e,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(e)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
+encodeURIComponent(e))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(e)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(e):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(e)))))}else this.openLocalFile(e,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
+function(a){var b=0,e=0,c,d;if(null==a){d=document.body;var f=document.documentElement;c=(d.clientWidth||f.clientWidth)-3;d=Math.max(d.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,e=a.offsetLeft,c=a.clientWidth,d=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=e+"px";f.style.width=Math.max(0,c-3)+"px";f.style.height=
+Math.max(0,d-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var e=new mxCodec(b.ownerDocument),c=new mxGraphModel;e.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(e=0;e<c.getChildCount(b);e++)a.push(c.getChildAt(b,e))}return a};EditorUi.prototype.openFileHandle=function(a,
+b,c,d,f){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var e=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,d);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(y){this.handleError(y,
+mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,d)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(c,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(c,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,d)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,d);try{this.loadLibrary(new LocalLibrary(this,a,c.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(c,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,d)}));else{if("image/png"==c.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
+c.type){var g=Editor.extractGraphModelFromPdf(a);null!=g&&(a=g)}this.spinner.stop();this.openLocalFile(a,b,d,f,null!=f?c:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var e=0;e<a.length;e++)mxUtils.bind(this,function(a){var e=new FileReader;e.onload=mxUtils.bind(this,function(e){try{this.openFileHandle(e.target.result,a.name,a,b)}catch(t){this.handleError(t)}});e.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
+window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?e.readAsText(a):e.readAsDataURL(a)})(a[e])};EditorUi.prototype.openLocalFile=function(a,b,c,d,f){var e=this.getCurrentFile(),g=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var e=mxUtils.parseXml(a);null!=e&&(this.editor.setGraphXml(e.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+a,b||this.defaultFilename,c,d,f))});if(null!=a&&0<a.length)null==e||!e.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?g():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=e&&e.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(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=e&&e.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 a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
+function(a,b){function e(a){if(null!=a){var e=a.lastIndexOf(".");0<e&&(a=a.substring(e+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,d=c.getCellStyle(a);e(mxStencilRegistry.getBasenameForStencil(d[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(e(mxMarker.getPackageForType(d[mxConstants.STYLE_STARTARROW])),e(mxMarker.getPackageForType(d[mxConstants.STYLE_ENDARROW])));for(var d=c.model.getChildCount(a),f=0;f<d;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
+function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
+a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
+pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,e=!1,d=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
+(a=Graph.decompress(a)))}catch(W){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(O){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();
+var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(a){null!=a?g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*"):g.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){var n=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),
+n,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(O){g.postMessage(JSON.stringify({event:"draft",error:O.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var p=1==k.enableRecent,q=1==k.enableSearch,v=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:c,message:k}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
+null,null,v?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):
+null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var t=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,t):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var y=null!=k.xml?
+k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,G=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=y;g.postMessage(JSON.stringify(b),"*")}),M=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(y)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);
+G(a)}),N=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=N){for(var L=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),K,R=0;R<this.pages.length;R++)if(this.pages[R].getId()==N){K=this.updatePageRoot(this.pages[R]);break}I.getGlobalVariable=function(a){return"page"==a?K.getName():"pagenumber"==a?1:L.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(K.root)}if(null!=k.layerIds){for(var Y=
+I.model,da=Y.getChildCells(Y.getRoot()),l={},R=0;R<k.layerIds.length;R++)l[k.layerIds[R]]=!0;for(R=0;R<da.length;R++)Y.setVisible(da[R],l[da[R].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){M(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){M(null)}),null,null,k.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):
+"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(y))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?G("data:image/png;base64,"+a.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);t=this.createLoadMessage("export");t.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();t.xml=mxUtils.getXml(aa);
+t.data=this.getFileData(null,null,!0,null,null,null,aa);t.format=k.format}else if("html"==k.format)y=this.editor.getGraphXml(),t.data=this.getHtml(y,this.editor.graph),t.xml=mxUtils.getXml(y),t.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);t.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);t.format="svg";var U=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();t.data=
+Editor.createSvgDataUri(a);g.postMessage(JSON.stringify(t),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(t.xml,this.editor.graph,null,!0,U,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var V=this.editor.graph.getSvg(fa);this.embedFonts(V,mxUtils.bind(this,
+function(a){k.embedImages||null==k.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){U(mxUtils.getXml(a))})):U(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(t),"*")}return}if("load"==k.action)e=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn),
+null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn),null!=k.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{if("merge"==k.action){var ca=this.getCurrentFile();null!=ca&&(n=m(k.xml),null!=n&&""!=n&&ca.mergeFile(new LocalFile(this,n),function(){g.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(a){g.postMessage(JSON.stringify({event:"merge",message:k,error:a}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?
+this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(O){this.handleError(O)}}var ea=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(X){this.handleError(X)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+d=m();e&&null==b&&(b=mxUtils.bind(this,function(a,b){var e=m();if(e!=d&&!c){var f=this.createLoadMessage("autosave");f.xml=e;e=JSON.stringify(f);(window.opener||window.parent).postMessage(e,"*")}d=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
+b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;g.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",
+this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){ea(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,f)}),""):null!=k&&"function"===
+typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=m(k),ea(k,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){l.apply(this,arguments);g.postMessage(JSON.stringify({event:"openLink",href:a,
+target:b,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,e=c.getSelectionCells(),d=0;d<a.length;d++){var f=new window[a[d].layout](c);if(null!=a[d].config)for(var g in a[d].config)f[g]=a[d].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==e.length?null:e)},d==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),
+e=[],d=[],f={};if(0<c.length){var g={},k=null,l=null,n=null,A=null,B=null,z=null,C=null,D=null,F="",E="auto",H="auto",J=null,I=null,G=40,M=40,N=100,L=0,K=this.editor.graph;K.getGraphBounds();for(var R=function(){null!=b?b(la):(K.setSelectionCells(la),K.scrollCellToVisible(K.getSelectionCell()))},Y=K.getFreeInsertPoint(),da=Y.x,aa=Y.y,Y=aa,fa=null,U="auto",D=null,V=[],ca=null,ea=null,O=0;O<c.length&&"#"==c[O].charAt(0);){a=c[O];for(O++;O<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[O].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(c[O].substring(1)),O++;if("#"!=a.charAt(1)){var W=a.indexOf(":");if(0<W){var T=mxUtils.trim(a.substring(1,W)),P=mxUtils.trim(a.substring(W+1));"label"==T?fa=K.sanitizeHtml(P):"labelname"==T&&0<P.length&&"-"!=P?A=P:"labels"==T&&0<P.length&&"-"!=P?B=JSON.parse(P):"style"==T?k=P:"parentstyle"==T?z=P:"stylename"==T&&0<P.length&&"-"!=P?n=P:"styles"==T&&0<P.length&&"-"!=P?l=JSON.parse(P):"identity"==T&&0<P.length&&"-"!=P?C=P:"parent"==T&&0<P.length&&"-"!=P?D=P:"namespace"==
+T&&0<P.length&&"-"!=P?F=P:"width"==T?E=P:"height"==T?H=P:"left"==T&&0<P.length?J=P:"top"==T&&0<P.length?I=P:"ignore"==T?ea=P.split(","):"connect"==T?V.push(JSON.parse(P)):"link"==T?ca=P:"padding"==T?L=parseFloat(P):"edgespacing"==T?G=parseFloat(P):"nodespacing"==T?M=parseFloat(P):"levelspacing"==T?N=parseFloat(P):"layout"==T&&(U=P)}}}if(null==c[O])throw Error(mxResources.get("invalidOrMissingFile"));for(var X=this.editor.csvToArray(c[O]),T=W=null,P=[],S=0;S<X.length;S++)C==X[S]&&(W=S),D==X[S]&&(T=
+S),P.push(mxUtils.trim(X[S]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+P[0]+"%");if(null!=V)for(var Z=0;Z<V.length;Z++)null==g[V[Z].to]&&(g[V[Z].to]={});C=[];for(S=O+1;S<c.length;S++){var ia=this.editor.csvToArray(c[S]);if(null==ia){var ha=40<c[S].length?c[S].substring(0,40)+"...":c[S];throw Error(ha+" ("+S+"):\n"+mxResources.get("containsValidationErrors"));}0<ia.length&&C.push(ia)}K.model.beginUpdate();try{for(S=0;S<C.length;S++){var ia=C[S],Q=null,ka=null!=
+W?F+ia[W]:null;null!=ka&&(Q=K.model.getCell(ka));var c=null!=Q,ba=new mxCell(fa,new mxGeometry(da,Y,0,0),k||"whiteSpace=wrap;html=1;");ba.vertex=!0;ba.id=ka;for(var ga=0;ga<ia.length;ga++)K.setAttributeForCell(ba,P[ga],ia[ga]);if(null!=A&&null!=B){var ma=B[ba.getAttribute(A)];null!=ma&&K.labelChanged(ba,ma)}if(null!=n&&null!=l){var ja=l[ba.getAttribute(n)];null!=ja&&(ba.style=ja)}K.setAttributeForCell(ba,"placeholders","1");ba.style=K.replacePlaceholders(ba,ba.style);c&&(K.model.setGeometry(Q,ba.geometry),
+K.model.setStyle(Q,ba.style),0>mxUtils.indexOf(d,Q)&&d.push(Q));Q=ba;if(!c)for(Z=0;Z<V.length;Z++)g[V[Z].to][Q.getAttribute(V[Z].to)]=Q;null!=ca&&"link"!=ca&&(K.setLinkForCell(Q,Q.getAttribute(ca)),K.setAttributeForCell(Q,ca,null));K.fireEvent(new mxEventObject("cellsInserted","cells",[Q]));var ua=this.editor.graph.getPreferredSizeForCell(Q);Q.vertex&&(null!=J&&null!=Q.getAttribute(J)&&(Q.geometry.x=da+parseFloat(Q.getAttribute(J))),null!=I&&null!=Q.getAttribute(I)&&(Q.geometry.y=aa+parseFloat(Q.getAttribute(I))),
+"@"==E.charAt(0)&&null!=Q.getAttribute(E.substring(1))?Q.geometry.width=parseFloat(Q.getAttribute(E.substring(1))):Q.geometry.width="auto"==E?ua.width+L:parseFloat(E),"@"==H.charAt(0)&&null!=Q.getAttribute(H.substring(1))?Q.geometry.height=parseFloat(Q.getAttribute(H.substring(1))):Q.geometry.height="auto"==H?ua.height+L:parseFloat(H),Y+=Q.geometry.height+M);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(Q)):(D=null!=T?K.model.getCell(F+ia[T]):null,e.push(Q),null!=D?(D.style=K.replacePlaceholders(D,z),K.addCell(Q,
+D)):d.push(K.addCell(Q)))}for(var na=d.slice(),la=d.slice(),Z=0;Z<V.length;Z++)for(var xa=V[Z],S=0;S<e.length;S++){var Q=e[S],ra=mxUtils.bind(this,function(a,b,c){var e=b.getAttribute(c.from);if(null!=e&&(K.setAttributeForCell(b,c.from,null),""!=e))for(var e=e.split(","),d=0;d<e.length;d++){var f=g[c.to][e[d]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var m="target"==c.placeholders==!c.invert?
+f:a,m=null!=c.style?K.replacePlaceholders(m,c.style):K.createCurrentEdgeStyle(),k=K.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var l=c.labels[m],n=new mxCell(l.label||m,new mxGeometry(null!=l.x?l.x:0,null!=l.y?l.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=l.dx||null!=l.dy)n.geometry.offset=new mxPoint(null!=l.dx?l.dx:0,null!=l.dy?l.dy:0);k.insert(n)}la.push(k);mxUtils.remove(c.invert?a:f,
+na)}}});ra(Q,Q,xa);if(null!=f[Q.id])for(ga=0;ga<f[Q.id].length;ga++)ra(Q,f[Q.id][ga],xa)}if(null!=ea)for(S=0;S<e.length;S++)for(Q=e[S],ga=0;ga<ea.length;ga++)K.setAttributeForCell(Q,mxUtils.trim(ea[ga]),null);if(0<d.length){var oa=new mxParallelEdgeLayout(K);oa.spacing=G;var va=function(){0<oa.spacing&&oa.execute(K.getDefaultParent());for(var a=0;a<d.length;a++){var b=K.getCellGeometry(d[a]);b.x=Math.round(K.snap(b.x));b.y=Math.round(K.snap(b.y));"auto"==E&&(b.width=Math.round(K.snap(b.width)));"auto"==
+H&&(b.height=Math.round(K.snap(b.height)))}};if("["==U.charAt(0)){var wa=R;K.view.validate();this.executeLayoutList(JSON.parse(U),function(){va();wa()});R=null}else if("circle"==U){var sa=new mxCircleLayout(K);sa.resetEdges=!1;var ya=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){sa.execute(K.getDefaultParent());va()},!0,R);R=null}else if("horizontaltree"==U||"verticaltree"==U||"auto"==U&&la.length==2*d.length-
+1&&1==na.length){K.view.validate();var ta=new mxCompactTreeLayout(K,"horizontaltree"==U);ta.levelDistance=M;ta.edgeRouting=!1;ta.resetEdges=!1;this.executeLayout(function(){ta.execute(K.getDefaultParent(),0<na.length?na[0]:null)},!0,R);R=null}else if("horizontalflow"==U||"verticalflow"==U||"auto"==U&&1==na.length){K.view.validate();var pa=new mxHierarchicalLayout(K,"horizontalflow"==U?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=M;pa.parallelEdgeSpacing=G;pa.interRankCellSpacing=
+N;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(K.getDefaultParent(),la);K.moveCells(la,da,aa)},!0,R);R=null}else if("organic"==U||"auto"==U&&la.length>d.length){K.view.validate();var qa=new mxFastOrganicLayout(K);qa.forceConstant=3*M;qa.resetEdges=!1;var Aa=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};oa=new mxParallelEdgeLayout(K);oa.spacing=G;this.executeLayout(function(){qa.execute(K.getDefaultParent());va()},!0,R);
+R=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=R&&R()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",e;for(e in urlParams)0>mxUtils.indexOf(a,e)&&null!=urlParams[e]&&(b+=c+e+"="+urlParams[e],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=
+window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(a=0==b?a+"?":a+"&",null!=urlParams[e]&&(a+=e+"="+urlParams[e],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.apply(this,arguments),
+c=this.editor.graph,e=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return e.apply(this,arguments)};var d=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return d.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var e=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
+2*e.x))/2)-e.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*e.y))/2)-e.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var e=c.getProperty("change"),d=b.source,f=b.outline;f.pageScale=d.pageScale;f.pageFormat=d.pageFormat;f.background=d.background;f.pageVisible=d.pageVisible;f.background=d.background;var g=mxUtils.getCurrentStyle(d.container);f.container.style.backgroundColor=g.backgroundColor;null!=d.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=d.view.backgroundPageShape.fill);b.outline.view.clear(e.previousPage.root,
+!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),
+b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&
+(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);
+this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=
+function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);
+this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=
+c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g,l){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),
+p=Math.floor(m.height*f/e.view.scale);if(k.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<l?"&dpi="+l:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(k))})}else"png"==
+c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,l):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));
+b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(a));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var d=document.createElement("div");d.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+d.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var l=g[a];if("R"==l.substring(0,1)){var n=JSON.parse(decodeURIComponent(l.substring(1)));f[n[0]]={id:n[0],title:n[1],downloadUrl:n[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){d.innerHTML="";if(0==a.length)d.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var c=0;c<a.length;c++){var e=a[c];f[e.id]&&(b[e.id]=e);var g=this.addCheckbox(d,e.title,f[e.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(e,g)}},mxUtils.bind(this,function(a){d.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));d.appendChild(b)}));
+c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+
+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);e&&d.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(g);e&&f.apply(this,
+arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var e={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?e.error={errResp:c}:null!=b&&(e.resp=b);this.remoteWin.postMessage(JSON.stringify(e),
+"*")});try{var e=a.funtionName,d=this.remoteInvokableFns[e];if(null!=d&&"function"===typeof this[e]){if(d.allowedDomains){for(var f=!1,g=0;g<d.allowedDomains.length;g++)if(b=="https://"+d.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+e+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(d.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[e].apply(this,k);else{var l=this[e].apply(this,k);
+c([l])}}else c(null,"Invalid Call: "+e+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var e=c.open("database",2);e.onupgradeneeded=function(a){try{var c=e.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(t){null!=b&&b(t)}};e.onsuccess=mxUtils.bind(this,function(b){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
+"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,e=!1,d,f=0,g=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=d.length)g();else{var a=d[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
+function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(H){console.log(H)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(H){console.log(H)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
+{};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||e||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(d=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+function(){c.close()}});e.onerror=b;e.onblocked=function(){}}catch(q){null!=b&&b(q)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.removeDatabaseItem=
+function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.getDatabaseItems=
+function(a,b,c){this.openDatabase(mxUtils.bind(this,function(e){try{c=c||"objects";var d=e.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];d.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};d.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(e){try{c=c||"objects";var d=e.transaction([c],"readonly").objectStore(c).getAllKeys();
+d.onsuccess=function(){a(d.result)};d.onerror=b}catch(u){null!=b&&b(u)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
+null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var e=this.getCurrentFile();null!=e?e.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
+a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
+function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,l,n){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,c,d,f,g,l,n)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,l,n,y,x,A,B,z,C,D,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,c,d,f,g,l,n,
+y,x,A,B,z,C,D,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,c,d)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};
+EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,c,d)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,
+b,c,d,f)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=
+function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,d,c,b,g,f){function l(){for(var a=A.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==A&&b++;B.style.display=0==b?"block":"none"}function n(a,b,c,e){function d(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:e};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(b.parentNode.removeChild(b),l()):d();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);d();c(a);v=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var e=new Date(b.modifiedDate),d=a.timeSince(e);null==d&&(d=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[d],"{1} ago"));c.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function k(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function m(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function q(b,c,d,f,g){function z(a,c,e){var d=document.createElement("li");d.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);d.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(d);e&&(d.style.display="none")}function C(){function a(b){c.push(e);if(null!=b.replies)for(var d=0;d<b.replies.length;d++)e=e.nextSibling,a(b.replies[d])}var c=[],e=G;a(b);return{pdiv:e,replies:c}}function x(c,e,d,g,l){function B(){k(t);b.addReply(u,function(a){u.id=a;b.replies.push(u);p(t);d&&d()},function(b){z();m(t);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,l)}function z(){n(u,t,function(a){B()},!0)}var v=C().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=q(u,b.replies,v,f+1);e?z():B()}if(g||!b.isResolved){B.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",b.id);G.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(G.style.backgroundColor="ghostWhite");
+var y=document.createElement("div");y.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;y.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";y.appendChild(F);var E=document.createElement("div");E.className="geCommentUsername";mxUtils.write(E,b.user.displayName||"");F.appendChild(E);E=document.createElement("div");E.className="geCommentDate";E.setAttribute("data-commentId",b.id);e(b,
+E);F.appendChild(E);G.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");G.appendChild(y);b.isLocked&&(G.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";y.appendChild(J);u||b.isLocked||0!=f&&!t||z(mxResources.get("reply"),function(){x("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||u||b.isLocked||(z(mxResources.get("edit"),
+function(){function c(){n(b,G,function(){k(G);b.editComment(b.content,function(){p(G)},function(b){m(G);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){k(G);b.deleteComment(function(a){if(!0===a){a=G.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var e=G.querySelectorAll(".geCommentAction");for(a=
+0;a<e.length;a++)e[a].parentNode.removeChild(e[a]);p(G);G.style.opacity="0.5"}else{e=C(b).replies;for(a=0;a<e.length;a++)A.removeChild(e[a]);for(a=0;a<c.length;a++)if(c[a]==b){c.splice(a,1);break}B.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(b){m(G);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||b.isLocked||0!=f||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=b.isResolved?"none":"",d=C(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<d.length;g++){d[g].style.backgroundColor=f;for(var k=d[g].querySelectorAll(".geCommentAction"),m=0;m<k.length;m++)k[m]!=c.parentNode&&(k[m].style.display=e);D||(d[g].style.display="none")}l()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,
+!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});G.appendChild(y);null!=d?A.insertBefore(G,d.nextSibling):A.appendChild(G);for(d=0;null!=b.replies&&d<b.replies.length;d++)y=b.replies[d],y.isResolved=b.isResolved,q(y,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,n(b,G,v.saveCallback,v.deleteOnCancel),b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(A.appendChild(v.div),n(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return G}}var u=
+!a.canComment(),t=a.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;A.style.bottom=parseInt(x)+7+"px";y.appendChild(A);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(B,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=x;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter="none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!u){var C=x.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function c(){n(e,d,function(b){k(d);a.addComment(b,function(a){b.id=a;F.push(b);p(d)},function(b){m(d);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),d=q(e,F,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(C)}C=x.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+C.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";E();a.preventDefault();mxEvent.consume(a)});z.appendChild(C);a.commentsRefreshNeeded()&&(C=x.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),
+mxEvent.addListener(C,"click",function(a){E();a.preventDefault();mxEvent.consume(a)}),z.appendChild(C));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),z.appendChild(x));y.appendChild(z);var F=[],E=mxUtils.bind(this,function(){this.hasError=
+!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(G){a.handleError(G)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});A.innerHTML="";A.appendChild(B);B.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),q(F[a],F,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),n(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+(a&&a.message?": "+a.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});E();this.refreshComments=E;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=A.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(z,6E4);this.refreshCommentsTime=
+z;this.window=new mxWindow(mxResources.get("comments"),y,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=
-function(a,e,c,b,k,f,l,d,g,m,n){var p=document.createElement("div");p.style.textAlign="center";n=null!=n?n:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=n+"px";t.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(t.style.height="60px");mxUtils.write(t,e);p.appendChild(t);null!=m&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",m),t.appendChild(e),p.appendChild(t));m=document.createElement("div");
-m.style.textAlign="center";m.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=d&&(f.innerHTML=d+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&m.appendChild(f);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=c&&
-c(u.checked)});m.appendChild(q);null!=l?(q.innerHTML=l+"<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";a.editor.cancelFirst||m.appendChild(f);p.appendChild(m);g?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.appendChild(u),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),t.appendChild(k),p.appendChild(t),
-mxEvent.addListener(k,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):m.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
-EditorUi.prototype.patchPages=function(a,e,c,b,k){var f={},l=[],d={},g={},m={},n={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])f[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(b=0;b<e[EditorUi.DIFF_REMOVE].length;b++)g[e[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(b=0;b<e[EditorUi.DIFF_INSERT].length;b++)d[e[EditorUi.DIFF_INSERT][b].previous]=e[EditorUi.DIFF_INSERT][b];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])b=
-e[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(n[b.previous]=p);if(null!=a){var t="";for(b=0;b<a.length;b++){var u=a[b].getId();m[u]=a[b];null!=n[t]||g[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(n[t]=u);t=u}}var q={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!q[b]){q[b]=!0;l.push(a);var g=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][b]:null;null!=g&&(this.updatePageRoot(a),null!=g.name&&a.setName(g.name),
-null!=g.view&&this.patchViewState(a,g.view),null!=g.cells&&this.patchPage(a,g.cells,f[a.getId()],k),!c||null==g.cells&&null==g.view||(a.needsUpdate=!0))}a=n[b];null!=a&&(delete n[b],v(m[a]));a=d[b];null!=a&&(delete d[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=m[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in n)v(m[n[p]]),
-delete n[p];for(p in d)x(d[p]),delete d[p];return l};EditorUi.prototype.patchViewState=function(a,e){if(null!=a.viewState&&null!=e){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in e)a.viewState[c]=JSON.parse(e[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
-EditorUi.prototype.createParentLookup=function(a,e){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var f=e[EditorUi.DIFF_INSERT][k],l=null!=f.parent?f.parent:"",d=null!=f.previous?f.previous:"";c(l).inserted[d]=f}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])f=e[EditorUi.DIFF_UPDATE][g],null!=f.previous&&(l=f.parent,null==l&&(k=a.getCell(g),null!=k&&(k=
-a.getParent(k),null!=k&&(l=k.getId()))),null!=l&&(c(l).moved[f.previous]=g));return b};
-EditorUi.prototype.patchPage=function(a,e,c,b){var k=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(k,e);k.beginUpdate();try{var l=k.updateEdgeParent,d=new mxDictionary,g=[];k.updateEdgeParent=function(a,c){!d.get(a)&&b&&(d.put(a,!0),g.push(a))};var m=f[""],n=null!=m&&null!=m.inserted?m.inserted[""]:null,p=null;null!=n&&(p=this.getCellForJson(n));if(null==p){var t=null!=m&&null!=m.moved?m.moved[""]:null;null!=t&&(p=k.getCell(t))}null!=p&&(k.setRoot(p),
-a.root=p);this.patchCellRecursive(a,k,k.root,f,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var q=k.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=q&&k.remove(q)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=v?v[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)n=e[EditorUi.DIFF_INSERT][u],
-q=k.getCell(n.id),null!=q&&(k.setTerminal(q,k.getCell(n.source),!0),k.setTerminal(q,k.getCell(n.target),!1));k.updateEdgeParent=l;if(b&&0<g.length)for(u=0;u<g.length;u++)k.contains(g[u])&&k.updateEdgeParent(g[u])}finally{k.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(a,e,c,b,k){if(null!=c){for(var f=b[c.getId()],l=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},d=0,g=e.getChildCount(c),m="",n=0;n<g;n++){var p=e.getChildAt(c,n).getId();null==f[m]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][p]||null==k[EditorUi.DIFF_UPDATE][p].previous&&null==k[EditorUi.DIFF_UPDATE][p].parent)&&(f[m]=p);m=p}g=mxUtils.bind(this,function(f,g){var l=null!=f?f.getId():"";if(null!=f&&g){var m=
-e.getCell(l);null!=m&&m!=f&&(f=null)}null!=f&&(e.getChildAt(c,d)!=f&&e.add(c,f,d),this.patchCellRecursive(a,e,f,b,k),d++);return l});for(m=[null];0<m.length;)if(n=m.shift(),n=g(null!=n?n.child:null,null!=n?n.insert:!1),p=f[n],null!=p&&(delete f[n],m.push({child:e.getCell(p)})),p=l[n],null!=p&&(delete l[n],m.push({child:this.getCellForJson(p),insert:!0})),0==m.length){for(n in f)m.push({child:e.getCell(f[n])}),delete f[n];for(n in l)m.push({child:this.getCellForJson(l[n]),insert:!0}),delete l[n]}}};
-EditorUi.prototype.patchCell=function(a,e,c,b){if(null!=e&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(e,c.value):null!=c.xmlValue&&a.setValue(e,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(e,c.style);null!=c.visible&&a.setVisible(e,1==c.visible);null!=c.collapsed&&a.setCollapsed(e,1==c.collapsed);null!=c.vertex&&(e.vertex=1==c.vertex);null!=c.edge&&(e.edge=1==c.edge);null!=c.connectable&&(e.connectable=
-1==c.connectable);null!=c.geometry&&a.setGeometry(e,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(e,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(e,a.getCell(c.target),!1);for(var k in c)this.cellProperties[k]||(e[k]=c[k])}};
-EditorUi.prototype.getPagesForNode=function(a,e){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(e||"diagram"),b=[];if(0<c.length)for(var k=0;k<c.length;k++){var f=new DiagramPage(c[k]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
-EditorUi.prototype.diffPages=function(a,e){for(var c=[],b=[],k={},f={},l={},d=null,g=0;g<e.length;g++)f[e[g].getId()]={page:e[g],prev:d},d=e[g];d=null;for(g=0;g<a.length;g++){var m=a[g].getId(),n=f[m];if(null==n)b.push(m);else{var p=this.diffPage(a[g],n.page),t={};0<Object.keys(p).length&&(t.cells=p);p=this.diffViewState(a[g],n.page);0<Object.keys(p).length&&(t.view=p);if((null!=n.prev?null==d:null!=d)||null!=d&&null!=n.prev&&d.getId()!=n.prev.getId())t.previous=null!=n.prev?n.prev.getId():"";null!=
-n.page.getName()&&a[g].getName()!=n.page.getName()&&(t.name=n.page.getName());0<Object.keys(t).length&&(l[m]=t)}delete f[a[g].getId()];d=a[g]}for(m in f)n=f[m],c.push({data:mxUtils.getXml(n.page.node),previous:null!=n.prev?n.prev.getId():""});0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
-EditorUi.prototype.createCellLookup=function(a,e,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:e};var b=a.getChildCount();e=null;for(var k=0;k<b;k++){var f=a.getChildAt(k);this.createCellLookup(f,e,c);e=f}return c};
-EditorUi.prototype.diffCellRecursive=function(a,e,c,b,k){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)k.push(a.getId());else{var l=this.diffCell(a,f.cell);if(null!=l.parent||(null!=f.prev?null==e:null!=e)||null!=e&&null!=f.prev&&e.getId()!=f.prev.getId())l.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(l).length&&(b[a.getId()]=l)}f=a.getChildCount();e=null;for(l=0;l<f;l++){var d=a.getChildAt(l);this.diffCellRecursive(d,e,c,b,k);e=d}return b};
-EditorUi.prototype.diffPage=function(a,e){var c=[],b=[],k={};this.updatePageRoot(a);this.updatePageRoot(e);var f=this.createCellLookup(e.root),l=this.diffCellRecursive(a.root,null,f,l,b),d;for(d in f){var g=f[d];c.push(this.getJsonForCell(g.cell,g.prev))}0<Object.keys(l).length&&(k[EditorUi.DIFF_UPDATE]=l);0<b.length&&(k[EditorUi.DIFF_REMOVE]=b);0<c.length&&(k[EditorUi.DIFF_INSERT]=c);return k};
-EditorUi.prototype.diffViewState=function(a,e){var c=a.viewState,b=e.viewState,k={};e==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=c&&null!=b)for(var f in this.viewStateProperties){var l=JSON.stringify(c[f]),d=JSON.stringify(b[f]);l!=d&&(k[f]=d)}return k};
-EditorUi.prototype.getCellForJson=function(a){var e=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,c=a.value;null!=a.xmlValue&&(c=mxUtils.parseXml(a.xmlValue).documentElement);e=new mxCell(c,e,a.style);e.connectable=0!=a.connectable;e.collapsed=1==a.collapsed;e.visible=0!=a.visible;e.vertex=1==a.vertex;e.edge=1==a.edge;e.id=a.id;for(var b in a)this.cellProperties[b]||(e[b]=a[b]);return e};
-EditorUi.prototype.getJsonForCell=function(a,e){var c={id:a.getId()};a.vertex&&(c.vertex=1);a.edge&&(c.edge=1);a.connectable||(c.connectable=0);null!=a.parent&&(c.parent=a.parent.getId());null!=e&&(c.previous=e.getId());null!=a.source&&(c.source=a.source.getId());null!=a.target&&(c.target=a.target.getId());null!=a.style&&(c.style=a.style);null!=a.geometry&&(c.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(c.collapsed=1);a.visible||(c.visible=0);null!=a.value&&("object"===typeof a.value&&
+function(a,d,c,b,g,f,l,n,e,k,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=m+"px";q.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(q.style.height="60px");mxUtils.write(q,d);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",k),q.appendChild(d),p.appendChild(q));k=document.createElement("div");
+k.style.textAlign="center";k.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=n&&(f.innerHTML=n+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);var t=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&
+c(u.checked)});k.appendChild(t);null!=l?(t.innerHTML=l+"<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";a.editor.cancelFirst||k.appendChild(f);p.appendChild(k);e?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),
+mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):k.style.marginTop="12px";this.init=function(){t.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
+EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},l=[],n={},e={},k={},m={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var p in b[EditorUi.DIFF_UPDATE])f[p]=b[EditorUi.DIFF_UPDATE][p];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)e[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)n[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(p in d[EditorUi.DIFF_UPDATE])b=
+d[EditorUi.DIFF_UPDATE][p],null!=b.previous&&(m[b.previous]=p);if(null!=a){var q="";for(b=0;b<a.length;b++){var u=a[b].getId();k[u]=a[b];null!=m[q]||e[u]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][u]&&null!=d[EditorUi.DIFF_UPDATE][u].previous||(m[q]=u);q=u}}var t={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!t[b]){t[b]=!0;l.push(a);var e=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]:null;null!=e&&(this.updatePageRoot(a),null!=e.name&&a.setName(e.name),
+null!=e.view&&this.patchViewState(a,e.view),null!=e.cells&&this.patchPage(a,e.cells,f[a.getId()],g),!c||null==e.cells&&null==e.view||(a.needsUpdate=!0))}a=m[b];null!=a&&(delete m[b],v(k[a]));a=n[b];null!=a&&(delete n[b],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=k[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(p in m)v(k[m[p]]),
+delete m[p];for(p in n)y(n[p]),delete n[p];return l};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
+EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],l=null!=f.parent?f.parent:"",n=null!=f.previous?f.previous:"";c(l).inserted[n]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var e in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][e],null!=f.previous&&(l=f.parent,null==l&&(g=a.getCell(e),null!=g&&(g=
+a.getParent(g),null!=g&&(l=g.getId()))),null!=l&&(c(l).moved[f.previous]=e));return b};
+EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var l=g.updateEdgeParent,n=new mxDictionary,e=[];g.updateEdgeParent=function(a,c){!n.get(a)&&b&&(n.put(a,!0),e.push(a))};var k=f[""],m=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=m&&(p=this.getCellForJson(m));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=g.getCell(q))}null!=p&&(g.setRoot(p),
+a.root=p);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var u=0;u<d[EditorUi.DIFF_REMOVE].length;u++){var t=g.getCell(d[EditorUi.DIFF_REMOVE][u]);null!=t&&g.remove(t)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(q in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(q),d[EditorUi.DIFF_UPDATE][q],null!=v?v[q]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(u=0;u<d[EditorUi.DIFF_INSERT].length;u++)m=d[EditorUi.DIFF_INSERT][u],
+t=g.getCell(m.id),null!=t&&(g.setTerminal(t,g.getCell(m.source),!0),g.setTerminal(t,g.getCell(m.target),!1));g.updateEdgeParent=l;if(b&&0<e.length)for(u=0;u<e.length;u++)g.contains(e[u])&&g.updateEdgeParent(e[u])}finally{g.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(a,d,c,b,g){if(null!=c){for(var f=b[c.getId()],l=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},n=0,e=d.getChildCount(c),k="",m=0;m<e;m++){var p=d.getChildAt(c,m).getId();null==f[k]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][p]||null==g[EditorUi.DIFF_UPDATE][p].previous&&null==g[EditorUi.DIFF_UPDATE][p].parent)&&(f[k]=p);k=p}e=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var l=
+d.getCell(k);null!=l&&l!=e&&(e=null)}null!=e&&(d.getChildAt(c,n)!=e&&d.add(c,e,n),this.patchCellRecursive(a,d,e,b,g),n++);return k});for(k=[null];0<k.length;)if(m=k.shift(),m=e(null!=m?m.child:null,null!=m?m.insert:!1),p=f[m],null!=p&&(delete f[m],k.push({child:d.getCell(p)})),p=l[m],null!=p&&(delete l[m],k.push({child:this.getCellForJson(p),insert:!0})),0==k.length){for(m in f)k.push({child:d.getCell(f[m])}),delete f[m];for(m in l)k.push({child:this.getCellForJson(l[m]),insert:!0}),delete l[m]}}};
+EditorUi.prototype.patchCell=function(a,d,c,b){if(null!=d&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(d,c.value):null!=c.xmlValue&&a.setValue(d,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(d,c.style);null!=c.visible&&a.setVisible(d,1==c.visible);null!=c.collapsed&&a.setCollapsed(d,1==c.collapsed);null!=c.vertex&&(d.vertex=1==c.vertex);null!=c.edge&&(d.edge=1==c.edge);null!=c.connectable&&(d.connectable=
+1==c.connectable);null!=c.geometry&&a.setGeometry(d,this.codec.decode(mxUtils.parseXml(c.geometry).documentElement));null!=c.source&&a.setTerminal(d,a.getCell(c.source),!0);null!=c.target&&a.setTerminal(d,a.getCell(c.target),!1);for(var g in c)this.cellProperties[g]||(d[g]=c[g])}};
+EditorUi.prototype.getPagesForNode=function(a,d){var c=this.editor.extractGraphModel(a,!0,!0);null!=c&&(a=c);var c=a.getElementsByTagName(d||"diagram"),b=[];if(0<c.length)for(var g=0;g<c.length;g++){var f=new DiagramPage(c[g]);this.updatePageRoot(f,!0);b.push(f)}else"mxGraphModel"==a.nodeName&&(f=new DiagramPage(a.ownerDocument.createElement("diagram")),f.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(f.node,Graph.compressNode(a,!0)),b.push(f));return b};
+EditorUi.prototype.diffPages=function(a,d){for(var c=[],b=[],g={},f={},l={},n=null,e=0;e<d.length;e++)f[d[e].getId()]={page:d[e],prev:n},n=d[e];n=null;for(e=0;e<a.length;e++){var k=a[e].getId(),m=f[k];if(null==m)b.push(k);else{var p=this.diffPage(a[e],m.page),q={};0<Object.keys(p).length&&(q.cells=p);p=this.diffViewState(a[e],m.page);0<Object.keys(p).length&&(q.view=p);if((null!=m.prev?null==n:null!=n)||null!=n&&null!=m.prev&&n.getId()!=m.prev.getId())q.previous=null!=m.prev?m.prev.getId():"";null!=
+m.page.getName()&&a[e].getName()!=m.page.getName()&&(q.name=m.page.getName());0<Object.keys(q).length&&(l[k]=q)}delete f[a[e].getId()];n=a[e]}for(k in f)m=f[k],c.push({data:mxUtils.getXml(m.page.node),previous:null!=m.prev?m.prev.getId():""});0<Object.keys(l).length&&(g[EditorUi.DIFF_UPDATE]=l);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
+EditorUi.prototype.createCellLookup=function(a,d,c){c=null!=c?c:{};c[a.getId()]={cell:a,prev:d};var b=a.getChildCount();d=null;for(var g=0;g<b;g++){var f=a.getChildAt(g);this.createCellLookup(f,d,c);d=f}return c};
+EditorUi.prototype.diffCellRecursive=function(a,d,c,b,g){b=null!=b?b:{};var f=c[a.getId()];delete c[a.getId()];if(null==f)g.push(a.getId());else{var l=this.diffCell(a,f.cell);if(null!=l.parent||(null!=f.prev?null==d:null!=d)||null!=d&&null!=f.prev&&d.getId()!=f.prev.getId())l.previous=null!=f.prev?f.prev.getId():"";0<Object.keys(l).length&&(b[a.getId()]=l)}f=a.getChildCount();d=null;for(l=0;l<f;l++){var n=a.getChildAt(l);this.diffCellRecursive(n,d,c,b,g);d=n}return b};
+EditorUi.prototype.diffPage=function(a,d){var c=[],b=[],g={};this.updatePageRoot(a);this.updatePageRoot(d);var f=this.createCellLookup(d.root),l=this.diffCellRecursive(a.root,null,f,l,b),n;for(n in f){var e=f[n];c.push(this.getJsonForCell(e.cell,e.prev))}0<Object.keys(l).length&&(g[EditorUi.DIFF_UPDATE]=l);0<b.length&&(g[EditorUi.DIFF_REMOVE]=b);0<c.length&&(g[EditorUi.DIFF_INSERT]=c);return g};
+EditorUi.prototype.diffViewState=function(a,d){var c=a.viewState,b=d.viewState,g={};d==this.currentPage&&(b=this.editor.graph.getViewState());if(null!=c&&null!=b)for(var f in this.viewStateProperties){var l=JSON.stringify(c[f]),n=JSON.stringify(b[f]);l!=n&&(g[f]=n)}return g};
+EditorUi.prototype.getCellForJson=function(a){var d=null!=a.geometry?this.codec.decode(mxUtils.parseXml(a.geometry).documentElement):null,c=a.value;null!=a.xmlValue&&(c=mxUtils.parseXml(a.xmlValue).documentElement);d=new mxCell(c,d,a.style);d.connectable=0!=a.connectable;d.collapsed=1==a.collapsed;d.visible=0!=a.visible;d.vertex=1==a.vertex;d.edge=1==a.edge;d.id=a.id;for(var b in a)this.cellProperties[b]||(d[b]=a[b]);return d};
+EditorUi.prototype.getJsonForCell=function(a,d){var c={id:a.getId()};a.vertex&&(c.vertex=1);a.edge&&(c.edge=1);a.connectable||(c.connectable=0);null!=a.parent&&(c.parent=a.parent.getId());null!=d&&(c.previous=d.getId());null!=a.source&&(c.source=a.source.getId());null!=a.target&&(c.target=a.target.getId());null!=a.style&&(c.style=a.style);null!=a.geometry&&(c.geometry=mxUtils.getXml(this.codec.encode(a.geometry)));a.collapsed&&(c.collapsed=1);a.visible||(c.visible=0);null!=a.value&&("object"===typeof a.value&&
"number"===typeof a.value.nodeType&&"string"===typeof a.value.nodeName&&"function"===typeof a.value.getAttribute?c.xmlValue=mxUtils.getXml(a.value):c.value=a.value);for(var b in a)this.cellProperties[b]||"function"===typeof a[b]||(c[b]=a[b]);return c};
-EditorUi.prototype.diffCell=function(a,e){function c(a){return null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute}var b={};a.vertex!=e.vertex&&(b.vertex=e.vertex?1:0);a.edge!=e.edge&&(b.edge=e.edge?1:0);a.connectable!=e.connectable&&(b.connectable=e.connectable?1:0);if((null!=a.parent?null==e.parent:null!=e.parent)||null!=a.parent&&null!=e.parent&&a.parent.getId()!=e.parent.getId())b.parent=null!=e.parent?e.parent.getId():"";
-if((null!=a.source?null==e.source:null!=e.source)||null!=a.source&&null!=e.source&&a.source.getId()!=e.source.getId())b.source=null!=e.source?e.source.getId():"";if((null!=a.target?null==e.target:null!=e.target)||null!=a.target&&null!=e.target&&a.target.getId()!=e.target.getId())b.target=null!=e.target?e.target.getId():"";c(a.value)&&c(e.value)?a.value.isEqualNode(e.value)||(b.xmlValue=mxUtils.getXml(e.value)):a.value!=e.value&&(c(e.value)?b.xmlValue=mxUtils.getXml(e.value):b.value=null!=e.value?
-e.value:null);a.style!=e.style&&(b.style=e.style);a.visible!=e.visible&&(b.visible=e.visible?1:0);a.collapsed!=e.collapsed&&(b.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(a.geometry,e.geometry,new mxGeometry)){var k=this.codec.encode(e.geometry);null!=k&&(b.geometry=mxUtils.getXml(k))}for(var f in a)this.cellProperties[f]||"function"===typeof a[f]||"function"===typeof e[f]||a[f]==e[f]||(b[f]=void 0===e[f]?null:e[f]);for(f in e)f in a||this.cellProperties[f]||"function"===typeof a[f]||"function"===
-typeof e[f]||a[f]==e[f]||(b[f]=void 0===e[f]?null:e[f]);return b};EditorUi.prototype.isObjectEqual=function(a,e,c){if(null==a&&null==e)return!0;if(null!=a?null==e:null!=e)return!1;var b=function(a,b){return null==c||c[a]!=b?!0===b?1:b:void 0};return JSON.stringify(a,b)==JSON.stringify(e,b)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(a){return a?mxSettings.settings.darkGridColor:
-mxSettings.settings.gridColor},setGridColor:function(a,e){e?mxSettings.settings.darkGridColor=a:mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=
-a},setCustomFonts:function(a){mxSettings.settings.customFonts=a},getCustomFonts:function(){for(var a=mxSettings.settings.customFonts||[],e=0;e<a.length;e++)"string"===typeof a[e]&&(a[e]={name:a[e],url:null});return a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,
+EditorUi.prototype.diffCell=function(a,d){function c(a){return null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute}var b={};a.vertex!=d.vertex&&(b.vertex=d.vertex?1:0);a.edge!=d.edge&&(b.edge=d.edge?1:0);a.connectable!=d.connectable&&(b.connectable=d.connectable?1:0);if((null!=a.parent?null==d.parent:null!=d.parent)||null!=a.parent&&null!=d.parent&&a.parent.getId()!=d.parent.getId())b.parent=null!=d.parent?d.parent.getId():"";
+if((null!=a.source?null==d.source:null!=d.source)||null!=a.source&&null!=d.source&&a.source.getId()!=d.source.getId())b.source=null!=d.source?d.source.getId():"";if((null!=a.target?null==d.target:null!=d.target)||null!=a.target&&null!=d.target&&a.target.getId()!=d.target.getId())b.target=null!=d.target?d.target.getId():"";c(a.value)&&c(d.value)?a.value.isEqualNode(d.value)||(b.xmlValue=mxUtils.getXml(d.value)):a.value!=d.value&&(c(d.value)?b.xmlValue=mxUtils.getXml(d.value):b.value=null!=d.value?
+d.value:null);a.style!=d.style&&(b.style=d.style);a.visible!=d.visible&&(b.visible=d.visible?1:0);a.collapsed!=d.collapsed&&(b.collapsed=d.collapsed?1:0);if(!this.isObjectEqual(a.geometry,d.geometry,new mxGeometry)){var g=this.codec.encode(d.geometry);null!=g&&(b.geometry=mxUtils.getXml(g))}for(var f in a)this.cellProperties[f]||"function"===typeof a[f]||"function"===typeof d[f]||a[f]==d[f]||(b[f]=void 0===d[f]?null:d[f]);for(f in d)f in a||this.cellProperties[f]||"function"===typeof a[f]||"function"===
+typeof d[f]||a[f]==d[f]||(b[f]=void 0===d[f]?null:d[f]);return b};EditorUi.prototype.isObjectEqual=function(a,d,c){if(null==a&&null==d)return!0;if(null!=a?null==d:null!=d)return!1;var b=function(a,b){return null==c||c[a]!=b?!0===b?1:b:void 0};return JSON.stringify(a,b)==JSON.stringify(d,b)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(a){return a?mxSettings.settings.darkGridColor:
+mxSettings.settings.gridColor},setGridColor:function(a,d){d?mxSettings.settings.darkGridColor=a:mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=
+a},setCustomFonts:function(a){mxSettings.settings.customFonts=a},getCustomFonts:function(){for(var a=mxSettings.settings.customFonts||[],d=0;d<a.length;d++)"string"===typeof a[d]&&(a[d]={name:a[d],url:null});return a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,
0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=
a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(a){mxSettings.settings.createTarget=a},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(a){mxSettings.settings.pageFormat=a},getUnit:function(){return mxSettings.settings.unit||mxConstants.POINTS},setUnit:function(a){mxSettings.settings.unit=
a},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(a){mxSettings.settings.isRulerOn=a},init:function(){mxSettings.settings={language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.defaultGridColor,
@@ -10085,372 +10087,372 @@ this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;mxUtils.extend(DrawioFile
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(a){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("Sync.start",
[this,"v"+DrawioFileSync.PROTOCOL])}catch(a){}this.installListeners()}window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=new Date;this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0))}};DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
-DrawioFileSync.prototype.updateOnlineState=function(){var a=mxUtils.bind(this,function(a){mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.enabled=!this.enabled;this.ui.updateButtonContainer();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus();!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if("min"==uiTheme&&null!=this.ui.buttonContainer){if(null==this.collaboratorsElement){var e=document.createElement("a");e.className="geToolbarButton";
-e.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;float:left;";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="24px 24px";e.style.height="24px";e.style.width="24px";a(e);this.ui.buttonContainer.appendChild(e);this.collaboratorsElement=e}}else null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(e=document.createElement("a"),e.className="geButton",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?"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),"dark"==uiTheme&&(e.style.filter="invert(100%)"),mxEvent.addListener(e,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(e),this.ui.toolbarContainer.appendChild(e),this.collaboratorsElement=e);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline()||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",a),this.collaboratorsElement.style.backgroundImage=
+DrawioFileSync.prototype.updateOnlineState=function(){var a=mxUtils.bind(this,function(a){mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.enabled=!this.enabled;this.ui.updateButtonContainer();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus();!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if("min"==uiTheme&&null!=this.ui.buttonContainer){if(null==this.collaboratorsElement){var d=document.createElement("a");d.className="geToolbarButton";
+d.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;float:left;";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="24px 24px";d.style.height="24px";d.style.width="24px";a(d);this.ui.buttonContainer.appendChild(d);this.collaboratorsElement=d}}else null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(d=document.createElement("a"),d.className="geButton",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?"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),"dark"==uiTheme&&(d.style.filter="invert(100%)"),mxEvent.addListener(d,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(d),this.ui.toolbarContainer.appendChild(d),this.collaboratorsElement=d);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline()||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",a),this.collaboratorsElement.style.backgroundImage=
"url("+(this.enabled?this.ui.isOffline()||!this.isConnected()||this.file.invalidChecksum?Editor.syncProblemImage:Editor.syncImage:Editor.syncDisabledImage)+")")};
-DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/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 a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var e=this.file.isRevisionHistorySupported(),
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/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 a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var d=this.file.isRevisionHistorySupported(),
c=this.lastMessage;this.lastMessage=null;null!=c&&40<c.length&&(c=c.substring(0,40)+"...");a=mxResources.get("lastChange",[a]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(a)+'" style="display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+(null!=c?' <span style="opacity:0;" title="'+mxUtils.htmlEntities(c)+'">('+mxUtils.htmlEntities(c)+")</span>":"")+(this.file.isEditable()?"":'<div class="geStatusAlert" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
-"</div>")+(this.isConnected()?"":'<div class="geStatusAlert geBlink" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>"));c=this.ui.statusContainer.getElementsByTagName("div");0<c.length&&e&&(c[0].style.cursor="pointer",c[0].style.textDecoration="underline",mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})));e=this.ui.statusContainer.getElementsByTagName("span");if(0<e.length){var b=
-e[0];mxUtils.setPrefixedStyle(b.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(b,100);mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(b,0)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert geBlink" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>"));c=this.ui.statusContainer.getElementsByTagName("div");0<c.length&&d&&(c[0].style.cursor="pointer",c[0].style.textDecoration="underline",mxEvent.addListener(c[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})));d=this.ui.statusContainer.getElementsByTagName("span");if(0<d.length){var b=
+d[0];mxUtils.setPrefixedStyle(b.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(b,100);mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(b,0)}),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(a){"desc"==a.a?this.file.savingFile||this.reloadDescriptor():"join"==a.a||"leave"==a.a?("join"==a.a&&this.file.stats.joined++,null!=a.name&&(this.lastMessage=mxResources.get("join"==a.a?"userJoined":"userLeft",[decodeURIComponent(a.name)]),this.resetUpdateStatusThread(),this.updateStatus())):null!=a.m&&(a=new Date(a.m),null==this.lastMessageModified||this.lastMessageModified<a)&&(this.lastMessageModified=a,this.fileChangedNotify())};
DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else var a=this.fileChanged(mxUtils.bind(this,function(a){this.updateStatus()}),mxUtils.bind(this,function(a){this.file.handleFileError(a)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=a}),!0)};
-DrawioFileSync.prototype.fileChanged=function(a,e,c,b){return this.notifyThread=b=window.setTimeout(mxUtils.bind(this,function(){null!=c&&c()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=c&&c()||(this.isValidState()?this.catchup(b,a,e,c):null!=e&&e())}),e):null!=e&&e())}),b?this.cacheReadyDelay:0)};
+DrawioFileSync.prototype.fileChanged=function(a,d,c,b){return this.notifyThread=b=window.setTimeout(mxUtils.bind(this,function(){null!=c&&c()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(b){null!=c&&c()||(this.isValidState()?this.catchup(b,a,d,c):null!=d&&d())}),d):null!=d&&d())}),b?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(a,e,c,b){if(null!=a&&(null==b||!b())){var k=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==k)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=e&&e();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a);if(null==l)this.reload(e,c,b);else{var d=0,g=!1,m=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=!0,p=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;this.reload(e,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(k)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(p);if(n&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var l=null,q=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var v=
-JSON.parse(k.getText());if(null!=v&&0<v.length)for(var t=0;t<v.length;t++){var y=this.stringToObject(v[t]);if(y.v>DrawioFileSync.PROTOCOL){g=!0;q=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)l=y.d.checksum,q.push(y.d.patch);else{g=!0;q=[];break}}}catch(A){q=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,l,a,e,c,b)):d<=this.maxCacheReadyRetries-1&&!g&&401!=k.getStatus()&&503!=k.getStatus()?(d++,this.file.stats.cacheMiss++,
-window.setTimeout(m,(d+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,c,b))}catch(A){null!=c&&c(A)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(m,this.cacheReadyDelay)}}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,e,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=e&&e(a)}),c,b)};
-DrawioFileSync.prototype.merge=function(a,e,c,b,k,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),d=this.file.getDescriptorRevisionId(c);if(!l){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-a[f]);var g=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",d,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",e==g,e);if(null!=e&&e!=g){var m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d);this.file.checksumError(k,a,"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nCurrent: "+g,d,"merge");
-return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(u);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),n=this.ui.hashValue(d),this.file.sendErrorReport("Error in merge",
-"From: "+m+"\nTo: "+n+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var p=this.file.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(q){}}};
-DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
+DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a);if(null==l)this.reload(d,c,b);else{var n=0,e=!1,k=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=!0,p=window.setTimeout(mxUtils.bind(this,
+function(){m=!1;this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(p);if(m&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var l=null,q=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var v=
+JSON.parse(g.getText());if(null!=v&&0<v.length)for(var y=0;y<v.length;y++){var x=this.stringToObject(v[y]);if(x.v>DrawioFileSync.PROTOCOL){e=!0;q=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)l=x.d.checksum,q.push(x.d.patch);else{e=!0;q=[];break}}}catch(A){q=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,l,a,d,c,b)):n<=this.maxCacheReadyRetries-1&&!e&&401!=g.getStatus()&&503!=g.getStatus()?(n++,this.file.stats.cacheMiss++,
+window.setTimeout(k,(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(A){null!=c&&c(A)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),c,b)};
+DrawioFileSync.prototype.merge=function(a,d,c,b,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),n=this.file.getDescriptorRevisionId(c);if(!l){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+a[f]);var e=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",n,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==e,d);if(null!=d&&d!=e){var k=this.ui.hashValue(this.file.getCurrentRevisionId()),m=this.ui.hashValue(n);this.file.checksumError(g,a,"From: "+k+"\nTo: "+m+"\nChecksum: "+d+"\nCurrent: "+e,n,"merge");
+return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),m=this.ui.hashValue(n),this.file.sendErrorReport("Error in merge",
+"From: "+k+"\nTo: "+m+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var p=this.file.getCurrentUser(),q=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,u)}}catch(t){}}};
+DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
-DrawioFileSync.prototype.createToken=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(k);b&&(200<=a.getStatus()&&299>=a.getStatus()?e(a.getText()):c({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
-DrawioFileSync.prototype.fileSaved=function(a,e,c,b,k){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor()),d=this.file.getDescriptorRevisionId(e),g=this.file.getCurrentRevisionId();if(null==
-l)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=c&&c(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",d,"to",g,"etag",this.file.getCurrentEtag(),"notify");else{var m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);e=this.file.getDescriptorSecret(e);var n=this.ui.getHashValueForPages(a),m=this.ui.diffPages(m,a),p=this.objectToString(this.createMessage({patch:m,
-checksum:n}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(d)+"&to="+encodeURIComponent(g)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(p.length<this.maxCacheEntrySize?"&data="+
-encodeURIComponent(p):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(a){window.clearTimeout(u);t&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",d,"to",g,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",m,"checksum",n)}}this.file.shadowPages=a};
+DrawioFileSync.prototype.createToken=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(g);b&&(200<=a.getStatus()&&299>=a.getStatus()?d(a.getText()):c({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
+DrawioFileSync.prototype.fileSaved=function(a,d,c,b,g){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor()),n=this.file.getDescriptorRevisionId(d),e=this.file.getCurrentRevisionId();if(null==
+l)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=c&&c(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),"notify");else{var k=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.file.getDescriptorSecret(d);var m=this.ui.getHashValueForPages(a),k=this.ui.diffPages(k,a),p=this.objectToString(this.createMessage({patch:k,
+checksum:m}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var q=!0,u=window.setTimeout(mxUtils.bind(this,function(){q=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(p.length<this.maxCacheEntrySize?"&data="+
+encodeURIComponent(p):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){window.clearTimeout(u);q&&(200<=a.getStatus()&&299>=a.getStatus()?null!=c&&c():b({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",k,"checksum",m)}}this.file.shadowPages=a};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
-DrawioFileSync.prototype.fileConflict=function(a,e,c){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,e,c):this.fileChanged(e,c)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(a,d,c){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,d,c):this.fileChanged(d,c)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),e={a:"leave"};null!=a&&(e.name=encodeURIComponent(a.displayName),e.uid=a.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(e))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),d={a:"leave"};null!=a&&(d.name=encodeURIComponent(a.displayName),d.uid=a.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(d))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,
"online",this.onlineListener),this.onlineListener=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)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;function mxAsyncCanvas(a){mxAbstractCanvas2D.call(this);this.htmlCanvas=a;a.images=a.images||[];a.subCanvas=a.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 a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,e,c,b,k){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,d,c,b,g){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
-mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,e,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,e,c,b,k,f){};mxAsyncCanvas.prototype.ellipse=function(a,e,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,e,c,b,k,f,l,d){k=this.rewriteImageSource(k);a=this.htmlCanvas.images[k];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=a,a.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length&&(a=this.state.scale,"html"==g&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[t]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
-mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,k){return c+c+b+b+k+k});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,d,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,d,c,b,g,f){};mxAsyncCanvas.prototype.ellipse=function(a,d,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
+mxAsyncCanvas.prototype.image=function(a,d,c,b,g,f,l,n){g=this.rewriteImageSource(g);a=this.htmlCanvas.images[g];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=a,a.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,d,c,b,g,f,l,n,e,k,m,p){if(null!=g&&0!=g.length&&(a=this.state.scale,"html"==e&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,b,g){return c+c+b+b+g+g});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
-mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,e){this.state.dx+=a;this.state.dy+=e;this.ctx.translate(a,e)};
-mxJsCanvas.prototype.rotate=function(a,e,c,b,k){b-=this.state.dx;k-=this.state.dy;this.ctx.translate(b,k);(e||c)&&this.ctx.scale(e?-1:1,c?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-b,-k)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,e,c,b,k,f,l,d,g){c=this.ctx.createLinearGradient(0,b,0,b+f);b=this.state;b.fillColor=a;b.fillAlpha=null!=d?d:1;b.gradientColor=e;b.gradientAlpha=null!=g?g:1;b.gradientDirection=l;a=this.hexToRgb(a);e=this.hexToRgb(e);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=e&&c.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+b.gradientAlpha+")");this.ctx.fillStyle=c};
-mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var e=0;e<a.length;e++)a[e]=parseInt(a[e],10);this.setLineDash(a)}else this.setLineDash([0])};
-mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var e=0;e<a.length;e++)a[e]=parseInt(a[e],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
+mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,d){this.state.dx+=a;this.state.dy+=d;this.ctx.translate(a,d)};
+mxJsCanvas.prototype.rotate=function(a,d,c,b,g){b-=this.state.dx;g-=this.state.dy;this.ctx.translate(b,g);(d||c)&&this.ctx.scale(d?-1:1,c?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-b,-g)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
+mxJsCanvas.prototype.setGradient=function(a,d,c,b,g,f,l,n,e){c=this.ctx.createLinearGradient(0,b,0,b+f);b=this.state;b.fillColor=a;b.fillAlpha=null!=n?n:1;b.gradientColor=d;b.gradientAlpha=null!=e?e:1;b.gradientDirection=l;a=this.hexToRgb(a);d=this.hexToRgb(d);null!=a&&c.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+b.fillAlpha+")");null!=d&&c.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+b.gradientAlpha+")");this.ctx.fillStyle=c};
+mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var d=0;d<a.length;d++)a[d]=parseInt(a[d],10);this.setLineDash(a)}else this.setLineDash([0])};
+mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(d){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var d=0;d<a.length;d++)a[d]=parseInt(a[d],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxJsCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxJsCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxJsCanvas.prototype.setShadow=function(a){(this.state.shadow=a)?(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(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
-mxJsCanvas.prototype.setShadowOffset=function(a,e){this.state.shadowDx=a;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(a,e){this.ctx.moveTo(a,e);this.lastMoveX=a;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(a,e){this.ctx.lineTo(a,e);this.lastMoveX=a;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(a,e,c,b){this.ctx.quadraticCurveTo(a,e,c,b);this.lastMoveX=c;this.lastMoveY=b};
-mxJsCanvas.prototype.arcTo=function(a,e,c,b,k,f,l){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,e,c,b,k,f,l);if(null!=a)for(e=0;e<a.length;e+=6)this.curveTo(a[e],a[e+1],a[e+2],a[e+3],a[e+4],a[e+5])};mxJsCanvas.prototype.curveTo=function(a,e,c,b,k,f){this.ctx.bezierCurveTo(a,e,c,b,k,f);this.lastMoveX=k;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,e,c,b){this.begin();this.moveTo(a,e);this.lineTo(a+c,e);this.lineTo(a+c,e+b);this.lineTo(a,e+b);this.close()};
-mxJsCanvas.prototype.roundrect=function(a,e,c,b,k,f){this.begin();this.moveTo(a+k,e);this.lineTo(a+c-k,e);this.quadTo(a+c,e,a+c,e+f);this.lineTo(a+c,e+b-f);this.quadTo(a+c,e+b,a+c-k,e+b);this.lineTo(a+k,e+b);this.quadTo(a,e+b,a,e+b-f);this.lineTo(a,e+f);this.quadTo(a,e,a+k,e)};mxJsCanvas.prototype.ellipse=function(a,e,c,b){this.ctx.save();this.ctx.translate(a+c/2,e+b/2);this.ctx.scale(c/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.setShadowColor=function(a){if(null==a||a==mxConstants.NONE)a=null,this.ctx.shadowColor="transparent";this.state.shadowColor=a;if(this.state.shadow&&null!=a){var d=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;a=this.hexToRgb(a);this.ctx.shadowColor="rgba("+a.r+","+a.g+","+a.b+","+d+")"}};mxJsCanvas.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a;this.setShadowColor(this.state.shadowColor)};
+mxJsCanvas.prototype.setShadowOffset=function(a,d){this.state.shadowDx=a;this.state.shadowDy=d;this.state.shadow&&(this.ctx.shadowOffsetX=a,this.ctx.shadowOffsetY=d)};mxJsCanvas.prototype.moveTo=function(a,d){this.ctx.moveTo(a,d);this.lastMoveX=a;this.lastMoveY=d};mxJsCanvas.prototype.lineTo=function(a,d){this.ctx.lineTo(a,d);this.lastMoveX=a;this.lastMoveY=d};mxJsCanvas.prototype.quadTo=function(a,d,c,b){this.ctx.quadraticCurveTo(a,d,c,b);this.lastMoveX=c;this.lastMoveY=b};
+mxJsCanvas.prototype.arcTo=function(a,d,c,b,g,f,l){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,d,c,b,g,f,l);if(null!=a)for(d=0;d<a.length;d+=6)this.curveTo(a[d],a[d+1],a[d+2],a[d+3],a[d+4],a[d+5])};mxJsCanvas.prototype.curveTo=function(a,d,c,b,g,f){this.ctx.bezierCurveTo(a,d,c,b,g,f);this.lastMoveX=g;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,d,c,b){this.begin();this.moveTo(a,d);this.lineTo(a+c,d);this.lineTo(a+c,d+b);this.lineTo(a,d+b);this.close()};
+mxJsCanvas.prototype.roundrect=function(a,d,c,b,g,f){this.begin();this.moveTo(a+g,d);this.lineTo(a+c-g,d);this.quadTo(a+c,d,a+c,d+f);this.lineTo(a+c,d+b-f);this.quadTo(a+c,d+b,a+c-g,d+b);this.lineTo(a+g,d+b);this.quadTo(a,d+b,a,d+b-f);this.lineTo(a,d+f);this.quadTo(a,d,a+g,d)};mxJsCanvas.prototype.ellipse=function(a,d,c,b){this.ctx.save();this.ctx.translate(a+c/2,d+b/2);this.ctx.scale(c/2,b/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,e,c,b,k,f,l,d){k=this.rewriteImageSource(k);k=this.images[k];if(null!=k&&0<k.height&&0<k.width){var g=this.ctx;g.save();if(f){f=k.width;var m=k.height,n=Math.min(c/f,b/m);a+=(c-f*n)/2;e+=(b-m*n)/2;c=f*n;b=m*n}l&&(g.translate(2*a+c,0),g.scale(-1,1));d&&(g.translate(0,2*e+b),g.scale(1,-1));g.drawImage(k,a,e,c,b);g.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
-mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,c=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=c}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,e,c,b,k,f,l,d,g,m,n,p){if(null!=k&&0!=k.length){c=this.state.scale;0!=p&&(this.ctx.translate(Math.round(a),Math.round(e)),this.ctx.rotate(p*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-e)));if("html"==g){k=this.subCanvas[this.canvasIndex++];g=k.height;p=k.width;switch(l){case mxConstants.ALIGN_MIDDLE:e-=g/2/c;break;case mxConstants.ALIGN_BOTTOM:e-=g/c}switch(f){case mxConstants.ALIGN_CENTER:a-=p/2/c;break;case mxConstants.ALIGN_RIGHT:a-=p/c}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(e)-.5,Math.round(k.width/c),Math.round(k.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(e)-.5,Math.round(k.width/c),Math.round(k.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(k,
-Math.round(a*c),Math.round(e*c))}else{this.ctx.save();this.updateFont();p=document.createElement("div");p.innerHTML=k;p.style.position="absolute";p.style.top="-9999px";p.style.left="-9999px";p.style.fontFamily=this.state.fontFamily;p.style.fontWeight="bold";p.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(p);g=[p.offsetWidth,p.offsetHeight];document.body.removeChild(p);k=k.split("\n");p=g[1];this.ctx.textBaseline="top";g=e;switch(l){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(k.length-1)*p/2;g=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=p*(k.length-1),g=e-this.state.fontSize}l=[];p=[];for(c=0;c<k.length;c++)p[c]=a,l[c]=this.ctx.measureText(k[c]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(p[c]-=l[c],f==mxConstants.ALIGN_CENTER&&(p[c]+=l[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=p[0];f=l[0];for(c=1;c<k.length;c++)a=Math.min(a,p[c]),f=Math.max(f,l[c]);this.ctx.save();
-a=Math.round(a)-.5;g=Math.round(g)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,g,f,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(a,g,f,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));this.ctx.restore()}for(c=0;c<k.length;c++)this.ctx.fillText(k[c],p[c],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
-mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,e){mxEventSource.call(this);this.ui=a;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
+mxJsCanvas.prototype.image=function(a,d,c,b,g,f,l,n){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var e=this.ctx;e.save();if(f){f=g.width;var k=g.height,m=Math.min(c/f,b/k);a+=(c-f*m)/2;d+=(b-k*m)/2;c=f*m;b=k*m}l&&(e.translate(2*a+c,0),e.scale(-1,1));n&&(e.translate(0,2*d+b),e.scale(1,-1));e.drawImage(g,a,d,c,b);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 a=this.ctx.shadowColor,d=this.ctx.shadowOffsetX,c=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=d;this.ctx.shadowOffsetY=c}else this.ctx.fill(),this.ctx.stroke()};
+mxJsCanvas.prototype.text=function(a,d,c,b,g,f,l,n,e,k,m,p){if(null!=g&&0!=g.length){c=this.state.scale;0!=p&&(this.ctx.translate(Math.round(a),Math.round(d)),this.ctx.rotate(p*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-d)));if("html"==e){g=this.subCanvas[this.canvasIndex++];e=g.height;p=g.width;switch(l){case mxConstants.ALIGN_MIDDLE:d-=e/2/c;break;case mxConstants.ALIGN_BOTTOM:d-=e/c}switch(f){case mxConstants.ALIGN_CENTER:a-=p/2/c;break;case mxConstants.ALIGN_RIGHT:a-=p/c}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(d)-.5,Math.round(g.width/c),Math.round(g.height/c))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(d)-.5,Math.round(g.width/c),Math.round(g.height/c)));this.ctx.scale(1/c,1/c);this.ctx.drawImage(g,
+Math.round(a*c),Math.round(d*c))}else{this.ctx.save();this.updateFont();p=document.createElement("div");p.innerHTML=g;p.style.position="absolute";p.style.top="-9999px";p.style.left="-9999px";p.style.fontFamily=this.state.fontFamily;p.style.fontWeight="bold";p.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(p);e=[p.offsetWidth,p.offsetHeight];document.body.removeChild(p);g=g.split("\n");p=e[1];this.ctx.textBaseline="top";e=d;switch(l){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";d-=(g.length-1)*p/2;e=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=p*(g.length-1),e=d-this.state.fontSize}l=[];p=[];for(c=0;c<g.length;c++)p[c]=a,l[c]=this.ctx.measureText(g[c]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(p[c]-=l[c],f==mxConstants.ALIGN_CENTER&&(p[c]+=l[c]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=p[0];f=l[0];for(c=1;c<g.length;c++)a=Math.min(a,p[c]),f=Math.max(f,l[c]);this.ctx.save();
+a=Math.round(a)-.5;e=Math.round(e)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,e,f,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,e,f,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(c=0;c<g.length;c++)this.ctx.fillText(g[c],p[c],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,d){mxEventSource.call(this);this.ui=a;this.cookieName=d;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
-DrawioClient.prototype.getPersistentToken=function(a){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&a&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var c=document.cookie;a=this.cookieName+"=";var b=c.indexOf(a);0<=b&&(b+=a.length,e=c.indexOf(";",b),0>e?e=c.length:postCookie=c.substring(e),e=c.substring(b,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie=a+"; expires="+
-c.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(a,e){try{if(null!=a)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+10);var b=this.cookieName+"="+a+"; path=/"+(e?"":"; expires="+c.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()}catch(k){this.ui.handleError(k)}};DrawioUser=function(a,e,c,b,k){this.id=a;this.email=e;this.displayName=c;this.pictureUrl=b;this.locale=k};DriveFile=function(a,e,c){DrawioFile.call(this,a,e);this.desc=c};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(a){var d=null;isLocalStorage&&(d=localStorage.getItem("."+this.cookieName),null==d&&a&&(d=sessionStorage.getItem("."+this.cookieName)));if(null==d&&"undefined"!=typeof Storage){var c=document.cookie;a=this.cookieName+"=";var b=c.indexOf(a);0<=b&&(b+=a.length,d=c.indexOf(";",b),0>d?d=c.length:postCookie=c.substring(d),d=c.substring(b,d),d=0<d.length?d:null,null!=d&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie=a+"; expires="+
+c.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(a,d){try{if(null!=a)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,a):localStorage.setItem("."+this.cookieName,a);else{if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+10);var b=this.cookieName+"="+a+"; path=/"+(d?"":"; expires="+c.toUTCString());"https"==document.location.protocol.toLowerCase()&&(b+=";secure");document.cookie=b}}else this.clearPersistentToken()}catch(g){this.ui.handleError(g)}};DrawioUser=function(a,d,c,b,g){this.id=a;this.email=d;this.displayName=c;this.pictureUrl=b;this.locale=g};DriveFile=function(a,d,c){DrawioFile.call(this,a,d);this.desc=c};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(a){return null!=a&&null!=a.error&&412==a.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
-DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var c=0;c<e.items.length;c++)if("anyoneWithLink"===e.items[c].id||"anyone"===e.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
-DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,e,c,b,k){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,e,c,b,k)}),c,b,k])};
-DriveFile.prototype.saveFile=function(a,e,c,b,k,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,d){var g=mxUtils.bind(this,function(f,l){try{var m=this.desc;this.ui.drive.saveFile(this,l,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,0!=a?(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=a,null!=d?this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b,d):null!=c&&c(a)):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
-this.setShadowModified(!1);g(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}}),k,k,f,null,a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}});g(f,e)}))):null!=c&&c()}catch(l){if(null!=b)b(l);else throw l;}};
-DriveFile.prototype.copyFile=function(a,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,a,e)}catch(c){e(c)}}),e,!0)};
-DriveFile.prototype.makeCopy=function(a,e,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(a,e,c){this.ui.drive.copyFile(this.getId(),a,e,c)};
-DriveFile.prototype.rename=function(a,e,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(k){this.hasSameExtension(a,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,e,c))}),c)};
-DriveFile.prototype.move=function(a,e,c){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=e&&e(a)}),c)};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(a){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 c=0;c<d.items.length;c++)if("anyoneWithLink"===d.items[c].id||"anyone"===d.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
+DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,d,c,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,c,b,g)}),c,b,g])};
+DriveFile.prototype.saveFile=function(a,d,c,b,g,f){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(a,n){var e=mxUtils.bind(this,function(f,l){try{var k=this.desc;this.ui.drive.saveFile(this,l,mxUtils.bind(this,function(a,e){try{this.savingFile=!1,0!=a?(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=a,null!=n?this.fileSaved(e,k,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b,n):null!=c&&c(a)):null!=b&&b(a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(a)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(c,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
+this.setShadowModified(!1);e(f,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(t){if(this.savingFile=!1,null!=b)b(t);else throw t;}}),g,g,f,null,a)}catch(q){if(this.savingFile=!1,null!=b)b(q);else throw q;}});e(f,d)}))):null!=c&&c()}catch(l){if(null!=b)b(l);else throw l;}};
+DriveFile.prototype.copyFile=function(a,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,a,d)}catch(c){d(c)}}),d,!0)};
+DriveFile.prototype.makeCopy=function(a,d,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(a,d,c){this.ui.drive.copyFile(this.getId(),a,d,c)};
+DriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
+DriveFile.prototype.move=function(a,d,c){this.ui.drive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.desc=a;this.descriptorChanged();null!=d&&d(a)}),c)};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.isRevisionHistorySupported=function(){return!0};
-DriveFile.prototype.getRevisions=function(a,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(c){for(var b=0;b<c.items.length;b++)mxUtils.bind(this,function(a){a.title=a.originalFilename;a.getXml=mxUtils.bind(this,function(b,c){this.ui.drive.getXmlFile(a,mxUtils.bind(this,function(a){b(a.getData())}),c)});a.getUrl=mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+a.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
-b?"&page="+b:""))+window.location.hash})})(c.items[b]);a(c.items)}),e)};DriveFile.prototype.getLatestVersion=function(a,e){this.ui.drive.getFile(this.getId(),a,e,!0)};DriveFile.prototype.getChannelId=function(){var a=this.ui.drive.getCustomProperty(this.desc,"channel");null!=a&&(a="G-"+this.getId()+"."+a);return a};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(a){this.desc=a};DriveFile.prototype.getDescriptorSecret=function(a){return this.ui.drive.getCustomProperty(a,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(a,e){a.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(a){return a.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(a){return a.etag};
-DriveFile.prototype.setDescriptorEtag=function(a,e){a.etag=e};DriveFile.prototype.loadPatchDescriptor=function(a,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(c){a(c)}),e)};DriveFile.prototype.patchDescriptor=function(a,e){DrawioFile.prototype.patchDescriptor.apply(this,arguments);a.headRevisionId=e.headRevisionId;a.modifiedDate=e.modifiedDate};
-DriveFile.prototype.loadDescriptor=function(a,e){this.ui.drive.loadDescriptor(this.getId(),a,e)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(a,e){function c(a,e,l){if(e.deleted)return null;l=new DriveComment(a,e.commentId||e.replyId,e.content,e.modifiedDate,e.createdDate,"resolved"==e.status,e.author.isAuthenticatedUser?b:new DrawioUser(e.author.permissionId,e.author.emailAddress,e.author.displayName,e.author.picture.url),l);for(var d=0;null!=e.replies&&d<e.replies.length;d++)l.addReplyDirect(c(a,e.replies[d],e.commentId));return l}var b=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var e=[],k=0;k<b.items.length;k++){var d=c(this,b.items[k]);null!=d&&e.push(d)}a(e)}),e)};DriveFile.prototype.addComment=function(a,e,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){e(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
-DriveFile.prototype.newComment=function(a,e){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,e)};DriveLibrary=function(a,e,c){DriveFile.call(this,a,e,c)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,e,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=e&&e(a)}),c)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);DrawioClient.call(this,a,"gDriveAuthInfo");this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",
+DriveFile.prototype.getRevisions=function(a,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(c){for(var b=0;b<c.items.length;b++)mxUtils.bind(this,function(a){a.title=a.originalFilename;a.getXml=mxUtils.bind(this,function(b,c){this.ui.drive.getXmlFile(a,mxUtils.bind(this,function(a){b(a.getData())}),c)});a.getUrl=mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+a.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
+b?"&page="+b:""))+window.location.hash})})(c.items[b]);a(c.items)}),d)};DriveFile.prototype.getLatestVersion=function(a,d){this.ui.drive.getFile(this.getId(),a,d,!0)};DriveFile.prototype.getChannelId=function(){var a=this.ui.drive.getCustomProperty(this.desc,"channel");null!=a&&(a="G-"+this.getId()+"."+a);return a};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(a){this.desc=a};DriveFile.prototype.getDescriptorSecret=function(a){return this.ui.drive.getCustomProperty(a,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(a,d){a.headRevisionId=d};DriveFile.prototype.getDescriptorRevisionId=function(a){return a.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(a){return a.etag};
+DriveFile.prototype.setDescriptorEtag=function(a,d){a.etag=d};DriveFile.prototype.loadPatchDescriptor=function(a,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(c){a(c)}),d)};DriveFile.prototype.patchDescriptor=function(a,d){DrawioFile.prototype.patchDescriptor.apply(this,arguments);a.headRevisionId=d.headRevisionId;a.modifiedDate=d.modifiedDate};
+DriveFile.prototype.loadDescriptor=function(a,d){this.ui.drive.loadDescriptor(this.getId(),a,d)};DriveFile.prototype.commentsSupported=function(){return!0};
+DriveFile.prototype.getComments=function(a,d){function c(a,d,l){if(d.deleted)return null;l=new DriveComment(a,d.commentId||d.replyId,d.content,d.modifiedDate,d.createdDate,"resolved"==d.status,d.author.isAuthenticatedUser?b:new DrawioUser(d.author.permissionId,d.author.emailAddress,d.author.displayName,d.author.picture.url),l);for(var f=0;null!=d.replies&&f<d.replies.length;f++)l.addReplyDirect(c(a,d.replies[f],d.commentId));return l}var b=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var d=[],g=0;g<b.items.length;g++){var n=c(this,b.items[g]);null!=n&&d.push(n)}a(d)}),d)};DriveFile.prototype.addComment=function(a,d,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){d(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.newComment=function(a,d){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,d)};DriveLibrary=function(a,d,c){DriveFile.call(this,a,d,c)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,d,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);DrawioClient.call(this,a,"gDriveAuthInfo");this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",
this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.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";a=JSON.parse(this.token);if(null!=a&&null!=a.current){a=a.current;
-this.userId=a.userId;this.token=a.access_token;var e=(a.expires-Date.now())/1E3;a.expires_in=600>e?1:e;this.resetTokenRefresh(a);this.authCalled=!1}};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";
+this.userId=a.userId;this.token=a.access_token;var d=(a.expires-Date.now())/1E3;a.expires_in=600>d?1:d;this.resetTokenRefresh(a);this.authCalled=!1}};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";
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.setUser=function(a){this.user=a;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=a.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(a){this.userId=a;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=function(){return this.user};
-DriveClient.prototype.getUsersList=function(){var a=[],e=JSON.parse(this.getPersistentToken(!0)),c=null;if(null!=e){null!=e.current&&(c=e.current.userId,a.push(e[c].user),a[0].isCurrent=!0);for(var b in e)"current"!=b&&b!=c&&a.push(e[b].user)}return a};DriveClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};
-DriveClient.prototype.execute=function(a){var e=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.logout();this.ui.showError(mxResources.get("error"),b,mxResources.get("help"),
-mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,e)};
-DriveClient.prototype.executeRequest=function(a,e,c){try{var b=!0,k=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=k&&window.clearTimeout(k);k=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var d=null,g=!1;"string"===typeof a.params?d=a.params:null!=a.params&&(d=JSON.stringify(a.params),
-g=!0);var m=a.fullUrl||this.GDriveBaseUrl+a.url;g&&(m+=(0<m.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(m,d,a.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):g&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(d){try{if(window.clearTimeout(k),
-b){var g;try{g=JSON.parse(d.getText())}catch(v){g=null}if(200<=d.getStatus()&&299>=d.getStatus())null!=e&&e(g);else{var m=null!=g&&null!=g.error?null!=g.error.data?g.error.data:g.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==g||null==g.error||-1!=g.error.code&&(403!=g.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=g.error.message)?null!=g&&null!=g.error&&(401==g.error.code||403==g.error.code&&"rateLimitExceeded"!=n)?403==g.error.code&&this.retryAuth||
-401==g.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(g),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=g&&null!=g.error&&412!=g.error.code&&404!=g.error.code&&400!=g.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(g):c(g)}}}catch(v){if(null!=c)c(v);else throw v;}}))}catch(p){if(null!=c)c(p);else throw p;}});null!=this.token&&this.authCalled?l():this.execute(l)}catch(d){if(null!=
-c)c(d);else throw d;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
-DriveClient.prototype.authorize=function(a,e,c,b,k){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?this.authorizeStep2(f.getText(),a,e,c,b,k):null!=c&&c(f)}),c)};
-DriveClient.prototype.authorizeStep2=function(a,e,c,b,k,f){var l=mxUtils.bind(this,function(a,d,e){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=d;this.resetTokenRefresh(a);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!d);null!=c&&c()}),b)}else null!=c&&(this.setPersistentToken(a,!d),c())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&
-(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var d=JSON.parse(this.getPersistentToken(!0));null!=d&&(null==this.userId?null!=d.current?(this.userId=d.current.userId,d=d[this.userId]):d=null:d=d[this.userId]);if(!e||null!=d&&null!=d.refresh_token)if(e)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a)+"&refresh_token="+d.refresh_token,null,"GET")).send(mxUtils.bind(this,
-function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),a.refresh_token=d.refresh_token,l(a,!0)):(0!=a.getStatus()&&this.logout(),null!=b&&b(a))}),b);else{var g="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(k?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+
-this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a);null==f?f=this.createAuthWin(g):f.location=g;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(a,c){window.onGoogleDriveCallback=null;try{null==a?null!=b&&b({message:mxResources.get("accessDenied")}):l(a,k,!0)}catch(p){null!=b&&b(p)}finally{null!=c&&c.close()}}),f.focus())}else null!=b&&b()}catch(m){if(null!=b)b(m);else throw m;}};
+DriveClient.prototype.getUsersList=function(){var a=[],d=JSON.parse(this.getPersistentToken(!0)),c=null;if(null!=d){null!=d.current&&(c=d.current.userId,a.push(d[c].user),a[0].isCurrent=!0);for(var b in d)"current"!=b&&b!=c&&a.push(d[b].user)}return a};DriveClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};
+DriveClient.prototype.execute=function(a){var d=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,c){this.authorize(!1,mxUtils.bind(this,function(){null!=c&&c();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.logout();this.ui.showError(mxResources.get("error"),b,mxResources.get("help"),
+mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,d)};
+DriveClient.prototype.executeRequest=function(a,d,c){try{var b=!0,g=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var n=null,e=!1;"string"===typeof a.params?n=a.params:null!=a.params&&(n=JSON.stringify(a.params),
+e=!0);var k=a.fullUrl||this.GDriveBaseUrl+a.url;e&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var m=new mxXmlRequest(k,n,a.method||"GET");m.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):e&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});m.send(mxUtils.bind(this,function(e){try{if(window.clearTimeout(g),
+b){var k;try{k=JSON.parse(e.getText())}catch(v){k=null}if(200<=e.getStatus()&&299>=e.getStatus())null!=d&&d(k);else{var m=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==k||null==k.error||-1!=k.error.code&&(403!=k.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=n)?403==k.error.code&&this.retryAuth||
+401==k.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(k):c(k)}}}catch(v){if(null!=c)c(v);else throw v;}}))}catch(p){if(null!=c)c(p);else throw p;}});null!=this.token&&this.authCalled?l():this.execute(l)}catch(n){if(null!=
+c)c(n);else throw n;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+DriveClient.prototype.authorize=function(a,d,c,b,g){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?this.authorizeStep2(f.getText(),a,d,c,b,g):null!=c&&c(f)}),c)};
+DriveClient.prototype.authorizeStep2=function(a,d,c,b,g,f){var l=mxUtils.bind(this,function(a,e,d){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=e;this.resetTokenRefresh(a);this.authCalled=!0;if(d||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!e);null!=c&&c()}),b)}else null!=c&&(this.setPersistentToken(a,!e),c())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&
+(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var n=JSON.parse(this.getPersistentToken(!0));null!=n&&(null==this.userId?null!=n.current?(this.userId=n.current.userId,n=n[this.userId]):n=null:n=n[this.userId]);if(!d||null!=n&&null!=n.refresh_token)if(d)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a)+"&refresh_token="+n.refresh_token,null,"GET")).send(mxUtils.bind(this,
+function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),a.refresh_token=n.refresh_token,l(a,!0)):(0!=a.getStatus()&&this.logout(),null!=b&&b(a))}),b);else{var e="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(g?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+
+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a);null==f?f=this.createAuthWin(e):f.location=e;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(a,c){window.onGoogleDriveCallback=null;try{null==a?null!=b&&b({message:mxResources.get("accessDenied")}):l(a,g,!0)}catch(p){null!=b&&b(p)}finally{null!=c&&c.close()}}),f.focus())}else null!=b&&b()}catch(k){if(null!=b)b(k);else throw k;}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
-DriveClient.prototype.checkToken=function(a){var e=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();e&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
-DriveClient.prototype.updateUser=function(a,e){try{var c={Authorization:"Bearer "+this.token};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(b){var c=JSON.parse(b);this.executeRequest({url:"/about"},mxUtils.bind(this,function(b){var e=mxResources.get("notAvailable"),d=e,f=null;null!=b&&null!=b.user&&(e=b.user.emailAddress,d=b.user.displayName,f=null!=b.user.picture?b.user.picture.url:null);this.setUser(new DrawioUser(c.id,e,d,f,c.locale));
-this.userId=c.id;null!=a&&a()}),e)}),e,null,null,null,null,c)}catch(b){if(null!=e)e(b);else throw b;}};DriveClient.prototype.copyFile=function(a,e,c,b){null!=a&&null!=e&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:e,properties:[{key:"channel",value:Editor.guid()}]}},c,b)};
-DriveClient.prototype.renameFile=function(a,e,c,b){null!=a&&null!=e&&this.executeRequest(this.createDriveRequest(a,{title:e}),c,b)};DriveClient.prototype.moveFile=function(a,e,c,b){null!=a&&null!=e&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:e}]}),c,b)};DriveClient.prototype.createDriveRequest=function(a,e){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:e}};
-DriveClient.prototype.getLibrary=function(a,e,c){return this.getFile(a,e,c,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,e,c,b){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=b?b:this.allFields)},e,c)};DriveClient.prototype.getCustomProperty=function(a,e){var c=a.properties,b=null;if(null!=c)for(var k=0;k<c.length;k++)if(c[k].key==e){b=c[k].value;break}return b};
-DriveClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;k=null!=k?k:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,e,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
-f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,e,c,null,{Authorization:"Bearer "+this.token}):b||k||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,e,c,!0,k):this.getXmlFile(a,e,c)}else c({message:mxResources.get("loggedOut")})}catch(d){if(null!=c)c(d);else throw d;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
-DriveClient.prototype.getXmlFile=function(a,e,c,b,k){try{var f={Authorization:"Bearer "+this.token},l=a.downloadUrl;this.ui.editor.loadUrl(l,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||k)a.mimeType!=this.libraryMimeType||k?e(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(a.title)){var f=b.lastIndexOf(",");if(0<f){var n=this.ui.extractGraphModelFromPng(b.substring(f+
-1));if(null!=n&&0<n.length)b=n;else try{var n=b.substring(f+1),p=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(p).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:b=p}catch(u){d=!0}}}else/\.pdf$/i.test(a.title)?(n=Editor.extractGraphModelFromPdf(b),null!=n&&0<n.length&&(d=!0,b=n)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(p=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(p):
-Base64.decode(p));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,l)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?e(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(q){if(null!=c)c(q);else throw q;}}),a.title):e(d?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(u){if(null!=
-c)c(u);else throw u;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(d){if(null!=c)c(d);else throw d;}};
-DriveClient.prototype.saveFile=function(a,e,c,b,k,f,l,d,g){try{var m=0;a.saveLevel=1;var n=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
-"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(E){}}),p=mxUtils.bind(this,function(b){n(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
-navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+m+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(D){}});if(a.isEditable()&&null!=a.desc){var t=(new Date).getTime(),
-u=a.desc.etag,q=a.desc.modifiedDate,v=a.desc.headRevisionId,x=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var y=null,A=!1,z={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(z.mimeType))z.mimeType=this.xmlMimeType,y=a.desc,A=e=!0;else if("application/octet-stream"==z.mimeType||"1"==urlParams["override-mime"]&&z.mimeType!=this.xmlMimeType)z.mimeType=this.xmlMimeType;var B=mxUtils.bind(this,function(b,k,B){try{a.saveLevel=3;a.constructor==DriveFile&&
-(null==d&&(d=[]),null==a.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));B||(null!=b||f||(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(z.thumbnail={image:b,mimeType:k}));var C=a.getData(),D=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-t,a.saveLevel=11,null==b)n({message:mxResources.get("errorSavingFile")+": Empty response"});
-else{var d=(new Date(b.modifiedDate)).getTime()-(new Date(q)).getTime();if(0>=d||u==b.etag||e&&v==b.headRevisionId){a.saveLevel=12;var f=[];0>=d&&f.push("invalid modified time");u==b.etag&&f.push("stale etag");e&&v==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");n({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+v+"."+q+"-"+this.ui.hashValue(u)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
-this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(S){}}else if(a.saveLevel=null,c(b,C),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
-"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(S){}}}}catch(S){p(S)}}),E=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=d&&(z.properties=d);var g=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),k=mxUtils.bind(this,function(b){a.saveLevel=5;try{var d=a.desc.mimeType!=
-this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){k=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(U){}this.executeRequest(this.createUploadRequest(a.getId(),z,c,e||b||d,f,b?null:g,A),mxUtils.bind(this,function(a){window.clearTimeout(l);k&&D(a)}),mxUtils.bind(this,function(b){window.clearTimeout(l);if(k){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+
-this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(m<this.staleEtagMaxRetries){m++;var d=2*m*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(B,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",m,"delay",d)}else{B(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
-"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(T){}}else"1"==urlParams.test&&c.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),n(b,c)}catch(T){p(T)}}),mxUtils.bind(this,function(){n(b)})):
-n(b)}catch(Z){p(Z)}}}))}catch(U){p(U)}}),B=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==g)k(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=e&&e.headRevisionId==v?("1"==urlParams.test&&g!=e.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",g,"to",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g=e.etag,k(b)):n({error:{code:412}},e)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,n(b))}))}});if(x&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),
-c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");z.thumbnail={image:c,mimeType:"image/png"};B(!1)}catch(V){try{B(!1)}catch(U){p(U)}}});q.src="data:image/png;base64,"+c}else B(!1)}catch(aa){p(aa)}});if(x){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),n,this.ui.getCurrentFile()!=a?C:null,K.scale,K.border)}else E(C,!1)}catch(G){p(G)}});try{a.saveLevel=2,(f||x||a.constructor==DriveLibrary||!this.enableThumbnails||
-"0"==urlParams.thumb||null!=z.mimeType&&"application/vnd.jgraph.mxfile"!=z.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(E){b=null}B(b,"image/png")}catch(E){p(E)}})))&&B(null,null,a.constructor!=DriveLibrary)}catch(C){p(C)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(C){p(C)}};
-DriveClient.prototype.insertFile=function(a,e,c,b,k,f,l){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,e,!1,l),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,e,a)):0==a?null!=k&&k({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,e,a))}),k)};
-DriveClient.prototype.createUploadRequest=function(a,e,c,b,k,f,l){k=null!=k?k:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(e)+
-"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=c?k?c:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(c):Graph.base64EncodeUnicode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");l&&(a.fullUrl+="&pinned=true");return a};
-DriveClient.prototype.pickFile=function(a,e){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=e?"genericPicker":"filePicker",b=mxUtils.bind(this,function(c){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(c).className&&(mxEvent.removeListener(document,"click",b),this[a].setVisible(!1))});if(null==this[a]||this[a+"Token"]!=this.token){this[a+"Token"]=this.token;var k=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),l=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),d=(new google.picker.DocsUploadView).setIncludeFolders(!0);e?(k.setMimeTypes("*/*"),f.setMimeTypes("*/*"),
-l.setMimeTypes("*/*")):(k.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes));this[a]=(new google.picker.PickerBuilder).setOAuthToken(this[a+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(k).addView(f).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).addView(d).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
-"click",b);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",b);this[a].setVisible(!0)}catch(g){this.ui.spinner.stop(),this.ui.handleError(g)}}))};
-DriveClient.prototype.pickFolder=function(a,e){this.folderPickerCallback=a;var c=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=this.token){this.folderPickerToken=
-this.token;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(this.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(e).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")).setCallback(mxUtils.bind(this,
-function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",a);this.folderPicker.setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))}catch(b){this.ui.handleError(b)}});e?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",
+DriveClient.prototype.checkToken=function(a){var d=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();d&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
+DriveClient.prototype.updateUser=function(a,d){try{var c={Authorization:"Bearer "+this.token};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(b){var c=JSON.parse(b);this.executeRequest({url:"/about"},mxUtils.bind(this,function(b){var d=mxResources.get("notAvailable"),f=d,e=null;null!=b&&null!=b.user&&(d=b.user.emailAddress,f=b.user.displayName,e=null!=b.user.picture?b.user.picture.url:null);this.setUser(new DrawioUser(c.id,d,f,e,c.locale));
+this.userId=c.id;null!=a&&a()}),d)}),d,null,null,null,null,c)}catch(b){if(null!=d)d(b);else throw b;}};DriveClient.prototype.copyFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:d,properties:[{key:"channel",value:Editor.guid()}]}},c,b)};
+DriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{title:d}),c,b)};DriveClient.prototype.moveFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:d}]}),c,b)};DriveClient.prototype.createDriveRequest=function(a,d){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:d}};
+DriveClient.prototype.getLibrary=function(a,d,c){return this.getFile(a,d,c,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,d,c,b){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=b?b:this.allFields)},d,c)};DriveClient.prototype.getCustomProperty=function(a,d){var c=a.properties,b=null;if(null!=c)for(var g=0;g<c.length;g++)if(c[g].key==d){b=c[g].value;break}return b};
+DriveClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,d,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
+f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,d,c,null,{Authorization:"Bearer "+this.token}):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,d,c,!0,g):this.getXmlFile(a,d,c)}else c({message:mxResources.get("loggedOut")})}catch(n){if(null!=c)c(n);else throw n;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
+DriveClient.prototype.getXmlFile=function(a,d,c,b,g){try{var f={Authorization:"Bearer "+this.token},l=a.downloadUrl;this.ui.editor.loadUrl(l,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?d(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(a.title)){var f=b.lastIndexOf(",");if(0<f){var m=this.ui.extractGraphModelFromPng(b.substring(f+
+1));if(null!=m&&0<m.length)b=m;else try{var m=b.substring(f+1),n=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m),q=this.ui.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0);null==q||0<q.getElementsByTagName("parsererror").length?e=!0:b=n}catch(u){e=!0}}}else/\.pdf$/i.test(a.title)?(m=Editor.extractGraphModelFromPdf(b),null!=m&&0<m.length&&(e=!0,b=m)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(n=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(n):
+Base64.decode(n));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,l)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),a.title):d(e?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(u){if(null!=
+c)c(u);else throw u;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(n){if(null!=c)c(n);else throw n;}};
+DriveClient.prototype.saveFile=function(a,d,c,b,g,f,l,n,e){try{var k=0;a.saveLevel=1;var m=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var e="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(e+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
+"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:e,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(F){}}),p=mxUtils.bind(this,function(b){m(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
+navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+k+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(D){}});if(a.isEditable()&&null!=a.desc){var q=(new Date).getTime(),
+u=a.desc.etag,t=a.desc.modifiedDate,v=a.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var x=null,A=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(B.mimeType))B.mimeType=this.xmlMimeType,x=a.desc,A=d=!0;else if("application/octet-stream"==B.mimeType||"1"==urlParams["override-mime"]&&B.mimeType!=this.xmlMimeType)B.mimeType=this.xmlMimeType;var z=mxUtils.bind(this,function(b,g,z){try{a.saveLevel=3;a.constructor==DriveFile&&
+(null==n&&(n=[]),null==a.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:null!=e?e:Editor.guid(32)}));z||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,mimeType:g}));var C=a.getData(),D=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-q,a.saveLevel=11,null==b)m({message:mxResources.get("errorSavingFile")+": Empty response"});
+else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(t)).getTime();if(0>=e||u==b.etag||d&&v==b.headRevisionId){a.saveLevel=12;var f=[];0>=e&&f.push("invalid modified time");u==b.etag&&f.push("stale etag");d&&v==b.headRevisionId&&f.push("stale revision");var g=f.join(", ");m({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+v+"."+t+"-"+this.ui.hashValue(u)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
+this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(K){}}else if(a.saveLevel=null,c(b,C),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(K){}}}}catch(K){p(K)}}),F=mxUtils.bind(this,function(c,e){a.saveLevel=4;try{null!=n&&(B.properties=n);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=mxUtils.bind(this,function(b){a.saveLevel=5;try{var g=a.desc.mimeType!=
+this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){l=!1;m({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(U){}this.executeRequest(this.createUploadRequest(a.getId(),B,c,d||b||g,e,b?null:f,A),mxUtils.bind(this,function(a){window.clearTimeout(n);l&&D(a)}),mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+
+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==f)if(k<this.staleEtagMaxRetries){k++;var e=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(z,e);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",e)}else{z(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?
+"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&c.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",f,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),m(b,c)}catch(ea){p(ea)}}),mxUtils.bind(this,function(){m(b)})):
+m(b)}catch(V){p(V)}}}))}catch(U){p(U)}}),z=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==f)g(b);else{var c=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){c=!1;m({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(fa){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){window.clearTimeout(e);if(c){a.saveLevel=10;try{null!=d&&d.headRevisionId==v?("1"==urlParams.test&&f!=d.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
+"from",f,"to",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),f=d.etag,g(b)):m({error:{code:412}},d)}catch(U){p(U)}}}),mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(a.saveLevel=11,m(b))}))}});if(y&&null==b){a.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/q.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(q.height*a);b.getContext("2d").drawImage(q,0,0,b.width,b.height);var c=b.toDataURL(),
+c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};z(!1)}catch(fa){try{z(!1)}catch(U){p(U)}}});q.src="data:image/png;base64,"+c}else z(!1)}catch(Y){p(Y)}});if(y){var I=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){F(a,!0)}),m,this.ui.getCurrentFile()!=a?C:null,I.scale,I.border)}else F(C,!1)}catch(G){p(G)}});try{a.saveLevel=2,(f||y||a.constructor==DriveLibrary||!this.enableThumbnails||
+"0"==urlParams.thumb||null!=B.mimeType&&"application/vnd.jgraph.mxfile"!=B.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){b=null}z(b,"image/png")}catch(F){p(F)}})))&&z(null,null,a.constructor!=DriveLibrary)}catch(C){p(C)}}else this.ui.editor.graph.reset(),m({message:mxResources.get("readOnly")})}catch(C){p(C)}};
+DriveClient.prototype.insertFile=function(a,d,c,b,g,f,l){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,d,!1,l),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,d,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,d,a))}),g)};
+DriveClient.prototype.createUploadRequest=function(a,d,c,b,g,f,l){g=null!=g?g:!1;var n={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(n["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:n,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(d)+
+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=c?g?c:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(c):Graph.base64EncodeUnicode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");l&&(a.fullUrl+="&pinned=true");return a};
+DriveClient.prototype.pickFile=function(a,d){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=d?"genericPicker":"filePicker",b=mxUtils.bind(this,function(c){"picker modal-dialog-bg picker-dialog-bg"==
+mxEvent.getSource(c).className&&(mxEvent.removeListener(document,"click",b),this[a].setVisible(!1))});if(null==this[a]||this[a+"Token"]!=this.token){this[a+"Token"]=this.token;var g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),l=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);d?(g.setMimeTypes("*/*"),f.setMimeTypes("*/*"),
+l.setMimeTypes("*/*")):(g.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes));this[a]=(new google.picker.PickerBuilder).setOAuthToken(this[a+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(g).addView(f).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+"click",b);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",b);this[a].setVisible(!0)}catch(e){this.ui.spinner.stop(),this.ui.handleError(e)}}))};
+DriveClient.prototype.pickFolder=function(a,d){this.folderPickerCallback=a;var c=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=this.token){this.folderPickerToken=
+this.token;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(this.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(d).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder")).setCallback(mxUtils.bind(this,
+function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",a);this.folderPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))}catch(b){this.ui.handleError(b)}});d?c():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(){c()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};
DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED?this.filePickerCallback(a.docs[0].id):a.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==
mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",a),this.libraryPicker.setVisible(!1))});if(null==this.libraryPicker||this.libraryPickerToken!=this.token){this.libraryPickerToken=this.token;var c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),b=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-k=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(b).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this,
+g=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(c).addView(b).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}catch(l){this.ui.spinner.stop(),this.ui.handleError(l)}}))};
-DriveClient.prototype.showPermissions=function(a){var e=mxUtils.bind(this,function(){var c=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+a)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(c.container,360,190,!0,!0);c.init()});this.sharingFailed?e():this.checkToken(mxUtils.bind(this,function(){try{var c=new gapi.drive.share.ShareClient(this.appId);
-c.setOAuthToken(this.token);c.setItemIds([a]);c.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var b=!1,c=0;c<a.length;c++)for(var l=0;l<a[c].addedNodes.length;l++){var d=a[c].addedNodes[l];"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(),e(),b=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&&(b=!0)}b&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(b){this.ui.handleError(b)}}))};
-DriveClient.prototype.clearPersistentToken=function(){var a=JSON.parse(this.getPersistentToken(!0))||{};delete a.current;delete a[this.userId];for(var e in a){a.current={userId:e,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(a))};
-DriveClient.prototype.setPersistentToken=function(a,e){var c=JSON.parse(this.getPersistentToken(!0))||{};a.userId=this.userId;c.current=a;c[this.userId]={refresh_token:a.refresh_token,user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(c),e)};DropboxFile=function(a,e,c){DrawioFile.call(this,a,e);this.stat=c};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};
+DriveClient.prototype.showPermissions=function(a){var d=mxUtils.bind(this,function(){var c=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+a)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(c.container,360,190,!0,!0);c.init()});this.sharingFailed?d():this.checkToken(mxUtils.bind(this,function(){try{var c=new gapi.drive.share.ShareClient(this.appId);
+c.setOAuthToken(this.token);c.setItemIds([a]);c.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(a){for(var b=!1,c=0;c<a.length;c++)for(var l=0;l<a[c].addedNodes.length;l++){var n=a[c].addedNodes[l];"BUTTON"==n.nodeName&&"ok"==n.getAttribute("name")&&null!=n.parentNode&&null!=n.parentNode.parentNode&&"dialog"==n.parentNode.parentNode.getAttribute("role")?
+(this.sharingFailed=!0,n.click(),d(),b=!0):"DIV"==n.nodeName&&"shr-q-shr-r-shr-xb"==n.className&&(b=!0)}b&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(b){this.ui.handleError(b)}}))};
+DriveClient.prototype.clearPersistentToken=function(){var a=JSON.parse(this.getPersistentToken(!0))||{};delete a.current;delete a[this.userId];for(var d in a){a.current={userId:d,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(a))};
+DriveClient.prototype.setPersistentToken=function(a,d){var c=JSON.parse(this.getPersistentToken(!0))||{};a.userId=this.userId;c.current=a;c[this.userId]={refresh_token:a.refresh_token,user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(c),d)};DropboxFile=function(a,d,c){DrawioFile.call(this,a,d);this.stat=c};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(a,e){var c=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(b){try{for(var c=[],f=b.entries.length-1;0<=f;f--)mxUtils.bind(this,function(a){c.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
-a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[f]);a(c)}catch(l){e(l)}}));c["catch"](function(a){e(a)})};DropboxFile.prototype.getLatestVersion=function(a,e){this.ui.dropbox.getFile(this.getId(),a,e)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,e,c,b,k){this.doSave(this.getTitle(),a,e,c,b,k)};DropboxFile.prototype.saveAs=function(a,e,c){this.doSave(a,!1,e,c)};
-DropboxFile.prototype.doSave=function(a,e,c,b,k,f){var l=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=l;this.saveFile(a,e,c,b,k,f)}),b,k,f])};
-DropboxFile.prototype.saveFile=function(a,e,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(e){if(e)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a,d,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=a;this.contentChanged();
-null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),e)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=this?this.getData():null,k.scale,k.border)}else f(this.getData())}catch(d){if(this.savingFile=!1,null!=b)b(d);else throw d;}else null!=b&&b()}),this.getTitle()==a?e(!0):this.ui.dropbox.checkExists(a,
-e)):null!=c&&c()};DropboxFile.prototype.rename=function(a,e,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=e&&e()):(this.stat=b,this.descriptorChanged(),this.save(!0,e,c))}),c)};DropboxLibrary=function(a,e,c){DropboxFile.call(this,a,e,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
+DropboxFile.prototype.getRevisions=function(a,d){var c=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(b){try{for(var c=[],f=b.entries.length-1;0<=f;f--)mxUtils.bind(this,function(a){c.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+
+a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[f]);a(c)}catch(l){d(l)}}));c["catch"](function(a){d(a)})};DropboxFile.prototype.getLatestVersion=function(a,d){this.ui.dropbox.getFile(this.getId(),a,d)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,d,c,b,g){this.doSave(this.getTitle(),a,d,c,b,g)};DropboxFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
+DropboxFile.prototype.doSave=function(a,d,c,b,g,f){var l=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=l;this.saveFile(a,d,c,b,g,f)}),b,g,f])};
+DropboxFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(d){if(d)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a,d,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=a;this.contentChanged();
+null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;null!=b&&b(a)}),e)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!=this?this.getData():null,g.scale,g.border)}else f(this.getData())}catch(n){if(this.savingFile=!1,null!=b)b(n);else throw n;}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,
+d)):null!=c&&c()};DropboxFile.prototype.rename=function(a,d,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=d&&d()):(this.stat=b,this.descriptorChanged(),this.save(!0,d,c))}),c)};DropboxLibrary=function(a,d,c){DropboxFile.call(this,a,d,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
-DropboxClient.prototype.updateUser=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(c){window.clearTimeout(k);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(k);b&&(null==f||401!==f.status||c?e({message:mxResources.get("accessDenied")}):(this.setUser(null),
-this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,e,!0)}),e)))}))};
-DropboxClient.prototype.authenticate=function(a,e){if(null==window.onDropboxCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(l,d){if(b){window.onDropboxCallback=null;b=!1;try{null==l?e({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.client.setAccessToken(l),
-this.setUser(null),k&&this.setPersistentToken(l),a())}catch(g){e(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onDropboxCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,e,c){var b=mxUtils.bind(this,function(f){var l=!0,d=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(d);l&&null!=e&&e(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(d);l&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
-f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){k(!0)},c)})}):this.authenticate(function(){b(!0)},c)))}))}),k=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){k(!0)},c,a):b(a)});null===this.client.getAccessToken()?this.authenticate(function(){k(!0)},c):k(!1)};DropboxClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!0)};
-DropboxClient.prototype.getFile=function(a,e,c,b){b=null!=b?b:!1;var k=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k){var f=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,e,c)});null!=this.token?f():this.authenticate(f,c)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(c,d){var f=
-k?c.lastIndexOf(","):-1,l=null;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+1)),null!=f&&0<f.length?c=f:l=new LocalFile(this,c,a,!0));e(null!=l?l:b?new DropboxLibrary(this.ui,c,d):new DropboxFile(this.ui,c,d))}),c,k)};
-DropboxClient.prototype.readFile=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});m.then(mxUtils.bind(this,function(a){}));m["catch"](function(a){window.clearTimeout(g);d&&null!=a&&409==a.status&&(d=!1,c({message:mxResources.get("fileNotFound")}))});m=this.client.filesDownload(a);m.then(mxUtils.bind(this,
-function(a){window.clearTimeout(g);if(d){d=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){e(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(t){c(t)}}}));m["catch"](mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(d=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
-c)})}):this.authenticate(function(){k(!0)},c)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},c):f(!1)};
-DropboxClient.prototype.checkExists=function(a,e,c){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){c?e(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e(!0,!0,b)},function(){e(!1,!0,b)})}),function(a){e(!0,!1)})};
-DropboxClient.prototype.renameFile=function(a,e,c,b){if(/[\\\/:\?\*"\|]/.test(e))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=e){var k=a.stat.path_display.substring(1),f=k.lastIndexOf("/");0<f&&(e=k.substring(0,f+1)+e)}null!=a&&null!=e&&a.stat.path_lower.substring(1)!==e.toLowerCase()?this.checkExists(e,mxUtils.bind(this,function(f,d,g){f?(f=mxUtils.bind(this,function(d){d=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+e,autorename:!1});this.executePromise(d,
-c,b)}),d&&g.path_lower.substring(1)!==e.toLowerCase()?(d=this.client.filesDelete({path:"/"+e.toLowerCase()}),this.executePromise(d,f,b)):f()):b()})):b({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,e,c,b){this.insertFile(a,e,c,b,!0)};
-DropboxClient.prototype.insertFile=function(a,e,c,b,k){k=null!=k?k:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,e,mxUtils.bind(this,function(a){k?c(new DropboxLibrary(this.ui,e,a)):c(new DropboxFile(this.ui,e,a))}),b):b()}))};
-DropboxClient.prototype.saveFile=function(a,e,c,b,k){/[\\\/:\?\*"\|]/.test(a)?b({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=e.length?b({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=k?k:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([e],{type:"text/plain"})}),this.executePromise(a,c,b))};
-DropboxClient.prototype.pickLibrary=function(a){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(a){this.ui.spinner.stop();this.ui.handleError(a)}),b=e[0].link.indexOf(this.appPath);if(0<b){var k=decodeURIComponent(e[0].link.substring(b+this.appPath.length-1));this.readFile({path:k},mxUtils.bind(this,function(b,l){if(null!=l&&l.id==e[0].id)try{this.ui.spinner.stop(),
-a(k.substring(1),new DropboxLibrary(this.ui,b,l))}catch(d){this.ui.handleError(d)}else this.createLibrary(e[0],a,c)}),c)}else this.createLibrary(e[0],a,c)}})})};
-DropboxClient.prototype.createLibrary=function(a,e,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(b){this.insertFile(a.name,b,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),e(a.getHash().substring(1),a)}catch(f){c(f)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
-DropboxClient.prototype.pickFile=function(a,e){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(e)this.ui.spinner.stop(),a(c[0].link);else{var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),k=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&f)k(c[0].link);else{var l=c[0].link.indexOf(this.appPath);if(0<l){var d=decodeURIComponent(c[0].link.substring(l+this.appPath.length-1));this.readFile({path:d},mxUtils.bind(this,function(e,l){if(null!=l&&l.id==c[0].id){var g=f?e.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<g&&(g=this.ui.extractGraphModelFromPng(e.substring(g+
-1)),null!=g&&0<g.length?e=g:m=new LocalFile(this,e,d,!0));a(d.substring(1),null!=m?m:new DropboxFile(this.ui,e,l))}else this.createFile(c[0],k,b)}),b,f)}else this.createFile(c[0],k,b)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
-DropboxClient.prototype.createFile=function(a,e,c){var b=/(\.png)$/i.test(a.name);this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(k){null!=k&&0<k.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var f=b?k.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(k.substring(f+1)),null!=f&&0<f.length&&(k=f));this.insertFile(a.name,k,mxUtils.bind(this,function(b){e(a.name,b)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
-(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,b)};OneDriveFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c};mxUtils.extend(OneDriveFile,DrawioFile);
-OneDriveFile.prototype.share=function(){var a=this.meta.webUrl,a=a.substring(0,a.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)a="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),c=this.meta.webUrl,a=c.substring(0,c.length-e.length-
-this.meta.name.length-(0<e.length?1:0)),c=c.substring(c.indexOf("/",8)),a=a+"/Forms/AllItems.aspx?id="+c+"&parent="+c.substring(0,c.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var a=this.meta["@microsoft.graph.downloadUrl"],b=a.indexOf("/_layouts/15/download.aspx?"),e=c=this.meta.webUrl,c=c.substring(8),c=c.substring(c.indexOf("/")),e=e.substring(0,e.lastIndexOf("/")),e=e.substring(e.indexOf("/",8)),a=a.substring(0,b)+"/_layouts/15/onedrive.aspx?id="+c+"&parent="+e}catch(k){}this.ui.editor.graph.openLink(a)};
-OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,e){return(null!=a.parentReference&&null!=a.parentReference.driveId?a.parentReference.driveId+"/":"")+(null!=e?a.parentReference.id:a.id)};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
+DropboxClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(c){window.clearTimeout(g);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(g);b&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),
+this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,d,!0)}),d)))}))};
+DropboxClient.prototype.authenticate=function(a,d){if(null==window.onDropboxCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(l,n){if(b){window.onDropboxCallback=null;b=!1;try{null==l?d({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.client.setAccessToken(l),
+this.setUser(null),g&&this.setPersistentToken(l),a())}catch(e){d(e)}finally{null!=n&&n.close()}}else null!=n&&n.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onDropboxCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,d,c){var b=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(n);l&&null!=d&&d(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);l&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},c)})}):this.authenticate(function(){b(!0)},c)))}))}),g=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){g(!0)},c,a):b(a)});null===this.client.getAccessToken()?this.authenticate(function(){g(!0)},c):g(!1)};DropboxClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!0)};
+DropboxClient.prototype.getFile=function(a,d,c,b){b=null!=b?b:!1;var g=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g){var f=mxUtils.bind(this,function(){var b=a.split("/");this.ui.convertFile(a,0<b.length?b[b.length-1]:a,null,this.extension,d,c)});null!=this.token?f():this.authenticate(f,c)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(c,f){var e=
+g?c.lastIndexOf(","):-1,k=null;0<e&&(e=this.ui.extractGraphModelFromPng(c.substring(e+1)),null!=e&&0<e.length?c=e:k=new LocalFile(this,c,a,!0));d(null!=k?k:b?new DropboxLibrary(this.ui,c,f):new DropboxFile(this.ui,c,f))}),c,g)};
+DropboxClient.prototype.readFile=function(a,d,c,b){var g=mxUtils.bind(this,function(l){var n=!0,e=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),k=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});k.then(mxUtils.bind(this,function(a){}));k["catch"](function(a){window.clearTimeout(e);n&&null!=a&&409==a.status&&(n=!1,c({message:mxResources.get("fileNotFound")}))});k=this.client.filesDownload(a);k.then(mxUtils.bind(this,
+function(a){window.clearTimeout(e);if(n){n=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,function(b){d(f.result,a)});b?f.readAsDataURL(a.fileBlob):f.readAsText(a.fileBlob)}catch(q){c(q)}}}));k["catch"](mxUtils.bind(this,function(a){window.clearTimeout(e);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?c({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+c)})}):this.authenticate(function(){g(!0)},c)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},c):f(!1)};
+DropboxClient.prototype.checkExists=function(a,d,c){var b=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(b,mxUtils.bind(this,function(b){c?d(!1,!0,b):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){d(!0,!0,b)},function(){d(!1,!0,b)})}),function(a){d(!0,!1)})};
+DropboxClient.prototype.renameFile=function(a,d,c,b){if(/[\\\/:\?\*"\|]/.test(d))b({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=d){var g=a.stat.path_display.substring(1),f=g.lastIndexOf("/");0<f&&(d=g.substring(0,f+1)+d)}null!=a&&null!=d&&a.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(f,g,e){f?(f=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+d,autorename:!1});this.executePromise(e,
+c,b)}),g&&e.path_lower.substring(1)!==d.toLowerCase()?(g=this.client.filesDelete({path:"/"+d.toLowerCase()}),this.executePromise(g,f,b)):f()):b()})):b({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(a,d,c,b){this.insertFile(a,d,c,b,!0)};
+DropboxClient.prototype.insertFile=function(a,d,c,b,g){g=null!=g?g:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,d,mxUtils.bind(this,function(a){g?c(new DropboxLibrary(this.ui,d,a)):c(new DropboxFile(this.ui,d,a))}),b):b()}))};
+DropboxClient.prototype.saveFile=function(a,d,c,b,g){/[\\\/:\?\*"\|]/.test(a)?b({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=d.length?b({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=g?g:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([d],{type:"text/plain"})}),this.executePromise(a,c,b))};
+DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),b=d[0].link.indexOf(this.appPath);if(0<b){var g=decodeURIComponent(d[0].link.substring(b+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(b,l){if(null!=l&&l.id==d[0].id)try{this.ui.spinner.stop(),
+a(g.substring(1),new DropboxLibrary(this.ui,b,l))}catch(n){this.ui.handleError(n)}else this.createLibrary(d[0],a,c)}),c)}else this.createLibrary(d[0],a,c)}})})};
+DropboxClient.prototype.createLibrary=function(a,d,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(b){this.insertFile(a.name,b,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),d(a.getHash().substring(1),a)}catch(f){c(f)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
+DropboxClient.prototype.pickFile=function(a,d){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(d)this.ui.spinner.stop(),a(c[0].link);else{var b=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),g=mxUtils.bind(this,
+function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&f)g(c[0].link);else{var l=c[0].link.indexOf(this.appPath);if(0<l){var n=decodeURIComponent(c[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(e,d){if(null!=d&&d.id==c[0].id){var k=f?e.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<k&&(k=this.ui.extractGraphModelFromPng(e.substring(k+
+1)),null!=k&&0<k.length?e=k:l=new LocalFile(this,e,n,!0));a(n.substring(1),null!=l?l:new DropboxFile(this.ui,e,d))}else this.createFile(c[0],g,b)}),b,f)}else this.createFile(c[0],g,b)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+DropboxClient.prototype.createFile=function(a,d,c){var b=/(\.png)$/i.test(a.name);this.ui.editor.loadUrl(a.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var f=b?g.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(g.substring(f+1)),null!=f&&0<f.length&&(g=f));this.insertFile(a.name,g,mxUtils.bind(this,function(b){d(a.name,b)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
+(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,b)};OneDriveFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c};mxUtils.extend(OneDriveFile,DrawioFile);
+OneDriveFile.prototype.share=function(){var a=this.meta.webUrl,a=a.substring(0,a.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)a="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),c=this.meta.webUrl,a=c.substring(0,c.length-d.length-
+this.meta.name.length-(0<d.length?1:0)),c=c.substring(c.indexOf("/",8)),a=a+"/Forms/AllItems.aspx?id="+c+"&parent="+c.substring(0,c.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var a=this.meta["@microsoft.graph.downloadUrl"],b=a.indexOf("/_layouts/15/download.aspx?"),d=c=this.meta.webUrl,c=c.substring(8),c=c.substring(c.indexOf("/")),d=d.substring(0,d.lastIndexOf("/")),d=d.substring(d.indexOf("/",8)),a=a.substring(0,b)+"/_layouts/15/onedrive.aspx?id="+c+"&parent="+d}catch(g){}this.ui.editor.graph.openLink(a)};
+OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(a,d){return(null!=a.parentReference&&null!=a.parentReference.driveId?a.parentReference.driveId+"/":"")+(null!=d?a.parentReference.id:a.id)};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(a){return null!=a&&(412==a.getStatus()||409==a.getStatus())};
-OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(a,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?a(JSON.parse(c.getText())):null!=e&&e()}),e)};OneDriveFile.prototype.getLatestVersion=function(a,e){this.ui.oneDrive.getFile(this.getId(),a,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};
-OneDriveFile.prototype.setDescriptor=function(a){this.meta=a};OneDriveFile.prototype.getDescriptorEtag=function(a){return a.eTag};OneDriveFile.prototype.setDescriptorEtag=function(a,e){a.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(a,e){var c=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(c+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):e(this.ui.oneDrive.parseRequestText(b))}),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(a,e,c,b,k){this.doSave(this.getTitle(),a,e,c,b,k)};OneDriveFile.prototype.saveAs=function(a,e,c){this.doSave(a,!1,e,c)};
-OneDriveFile.prototype.doSave=function(a,e,c,b,k,f){var l=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=l;this.saveFile(a,e,c,b,k,f)}),b,k,f])};
-OneDriveFile.prototype.saveFile=function(a,e,c,b,k,f){if(!this.isEditable())null!=c&&c();else if(!this.savingFile)if(this.getTitle()==a){var l=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var a=f||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a,d){this.setModified(this.getShadowModified());this.savingFile=
+OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(a,d){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?a(JSON.parse(c.getText())):null!=d&&d()}),d)};OneDriveFile.prototype.getLatestVersion=function(a,d){this.ui.oneDrive.getFile(this.getId(),a,d)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};
+OneDriveFile.prototype.setDescriptor=function(a){this.meta=a};OneDriveFile.prototype.getDescriptorEtag=function(a){return a.eTag};OneDriveFile.prototype.setDescriptorEtag=function(a,d){a.eTag=d};OneDriveFile.prototype.loadPatchDescriptor=function(a,d){var c=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(c+"?select=etag,file",mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?a(JSON.parse(b.getText())):d(this.ui.oneDrive.parseRequestText(b))}),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(a,d,c,b,g){this.doSave(this.getTitle(),a,d,c,b,g)};OneDriveFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)};
+OneDriveFile.prototype.doSave=function(a,d,c,b,g,f){var l=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=l;this.saveFile(a,d,c,b,g,f)}),b,g,f])};
+OneDriveFile.prototype.saveFile=function(a,d,c,b,g,f){if(!this.isEditable())null!=c&&c();else if(!this.savingFile)if(this.getTitle()==a){var l=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var a=f||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a,d){this.setModified(this.getShadowModified());this.savingFile=
!1;this.meta=a;this.fileSaved(d,e,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a,c){try{this.savingFile=!1,this.isConflict(c)?(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();l()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(a)}catch(p){if(this.savingFile=
-!1,null!=b)b(p);else throw p;}}),a)}catch(m){if(this.savingFile=!1,null!=b)b(m);else throw m;}});l()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))};
-OneDriveFile.prototype.rename=function(a,e,c){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(k){this.hasSameExtension(a,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=e&&e(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,e,c))}),c)};
-OneDriveFile.prototype.move=function(a,e,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=e&&e(a)}),c)};OneDriveLibrary=function(a,e,c){OneDriveFile.call(this,a,e,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,e,c){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=e&&e(a)}),c)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=null!=a.endpointHint?a.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};mxUtils.extend(OneDriveClient,DrawioClient);
+!1,null!=b)b(p);else throw p;}}),a)}catch(k){if(this.savingFile=!1,null!=b)b(k);else throw k;}});l()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))};
+OneDriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)};
+OneDriveFile.prototype.move=function(a,d,c){this.ui.oneDrive.moveFile(this.getId(),a,mxUtils.bind(this,function(a){this.meta=a;this.descriptorChanged();null!=d&&d(a)}),c)};OneDriveLibrary=function(a,d,c){OneDriveFile.call(this,a,d,c)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(a,d,c){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};OneDriveLibrary.prototype.open=function(){};OneDriveClient=function(a){DrawioClient.call(this,a,"oneDriveAuthInfo");a=JSON.parse(this.token);null!=a&&(this.token=a.access_token,this.endpointHint=null!=a.endpointHint?a.endpointHint.replace("/Documents","/_layouts/15/onedrive.aspx"):a.endpointHint,this.tokenExpiresOn=a.expiresOn,a=(this.tokenExpiresOn-Date.now())/1E3,this.resetTokenRefresh(600>a?1:a))};mxUtils.extend(OneDriveClient,DrawioClient);
OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");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 offline_access";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(a){if(null==a||""===a)return!1;for(var e=0;e<this.invalidFilenameRegExs.length;e++)if(this.invalidFilenameRegExs[e].test(a))return!1;return!0};
-OneDriveClient.prototype.get=function(a,e,c){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(e,c);return a};
-OneDriveClient.prototype.updateUser=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(f){window.clearTimeout(k);b&&(200>f.getStatus()||300<=f.getStatus()?c?e({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,e,!0)}),e)):(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,null,f.displayName)),
-a()))}),mxUtils.bind(this,function(a){window.clearTimeout(k);b&&e(a)}))};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*a))};
-OneDriveClient.prototype.authenticate=function(a,e,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,e,c):null!=e&&e(b)}),e)};
-OneDriveClient.prototype.authenticateStep2=function(a,e,c,b){if(null==window.onOneDriveCallback){var k=mxUtils.bind(this,function(){var f=!0,l=JSON.parse(this.getPersistentToken(!0));null!=l?(new mxXmlRequest(this.redirectUri+"?refresh_token="+l.refresh_token+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),this.token=a.access_token,
-a.access_token=a.access_token,a.refresh_token=a.refresh_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,this.setPersistentToken(JSON.stringify(a),!a.remember),this.resetTokenRefresh(a.expires_in),e()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=a.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:k}):k())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,g){var d="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)+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),d=window.open(d,"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!=d&&(window.onOneDriveCallback=
-mxUtils.bind(this,function(a,d){if(f){window.onOneDriveCallback=null;f=!1;try{null==a?c({message:mxResources.get("accessDenied"),retry:k}):(null!=g&&g(),this.setUser(null),this.token=a.access_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,a.remember=b,this.setPersistentToken(JSON.stringify(a),!b),this.resetTokenRefresh(a.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){e()}),c))}catch(t){c(t)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),
-d.focus())}),mxUtils.bind(this,function(){f&&(window.onOneDriveCallback=null,f=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,e){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var b=JSON.parse(c.getText());0<b.webUrl.indexOf(".sharepoint.com")?this.endpointHint=b.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(k.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(k),!k.remember));
-a();return}}catch(f){}e({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),e)};
-OneDriveClient.prototype.executeRequest=function(a,e,c){var b=mxUtils.bind(this,function(k){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);f&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),e(a)):k||401!==a.getStatus()&&400!==a.getStatus()?c(this.parseRequestText(a)):this.authenticate(function(){b(!0)},
-c,k))}),mxUtils.bind(this,function(a){window.clearTimeout(l);f&&c(a)}))});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},c):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var e=a.split("/");return 1<e.length?{driveId:e[0],id:e[1]}:{id:a}};
-OneDriveClient.prototype.getItemURL=function(a,e){var c=a.split("/");return 1<c.length?(e?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(e?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(a){var e=a.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<e&&(a=a.substring(0,e));return a};
-OneDriveClient.prototype.getFile=function(a,e,c,b,k){k=null!=k?k:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),d=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&d)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,e,c);else{var f=!0,m=window.setTimeout(mxUtils.bind(this,
-function(){f=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(m),f){/\.html$/i.test(b.name)&&(a=this.removeExtraHtmlContent(a));var g=d?a.lastIndexOf(","):-1,l=null;if(0<g){var n=this.ui.extractGraphModelFromPng(a.substring(g+1));null!=n&&0<n.length?a=n:l=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var q=a.substring(22);a=window.atob&&
-!mxClient.IS_SF?atob(q):Base64.decode(q)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=c)c(x);else throw x;}}),b.name):null!=l?e(l):k?e(new OneDriveLibrary(this.ui,
-a,b)):e(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(m);f&&c(this.parseRequestText(a))}),d||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
-OneDriveClient.prototype.renameFile=function(a,e,c,b){null!=a&&null!=e&&(this.isValidFilename(e)?this.checkExists(a.getParentId(),e,!1,mxUtils.bind(this,function(k){k?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:e}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
-OneDriveClient.prototype.moveFile=function(a,e,c,b){e=this.getItemRef(e);var k=this.getItemRef(a);e.driveId!=k.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:e}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k)};
-OneDriveClient.prototype.insertFile=function(a,e,c,b,k,f){this.isValidFilename(a)?(k=null!=k?k:!1,this.checkExists(f,a,!0,mxUtils.bind(this,function(l){l?(l="/me/drive/root",null!=f&&(l=this.getItemURL(f,!0)),l=this.baseUrl+l+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(l,e,"PUT",null,mxUtils.bind(this,function(a){k?c(new OneDriveLibrary(this.ui,e,a)):c(new OneDriveFile(this.ui,e,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
+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(a){if(null==a||""===a)return!1;for(var d=0;d<this.invalidFilenameRegExs.length;d++)if(this.invalidFilenameRegExs[d].test(a))return!1;return!0};
+OneDriveClient.prototype.get=function(a,d,c){a=new mxXmlRequest(a,null,"GET");a.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Authorization","Bearer "+this.token)});a.send(d,c);return a};
+OneDriveClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(f){window.clearTimeout(g);b&&(200>f.getStatus()||300<=f.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,d,!0)}),d)):(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,null,f.displayName)),
+a()))}),mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)}))};OneDriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<a&&(this.tokenRefreshInterval=1E3*a,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*a))};
+OneDriveClient.prototype.authenticate=function(a,d,c){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?this.authenticateStep2(b.getText(),a,d,c):null!=d&&d(b)}),d)};
+OneDriveClient.prototype.authenticateStep2=function(a,d,c,b){if(null==window.onOneDriveCallback){var g=mxUtils.bind(this,function(){var f=!0,l=JSON.parse(this.getPersistentToken(!0));null!=l?(new mxXmlRequest(this.redirectUri+"?refresh_token="+l.refresh_token+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),null,"GET")).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),this.token=a.access_token,
+a.access_token=a.access_token,a.refresh_token=a.refresh_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,this.setPersistentToken(JSON.stringify(a),!a.remember),this.resetTokenRefresh(a.expires_in),d()):(this.clearPersistentToken(),this.setUser(null),this.token=null,401!=a.getStatus()||b?c({message:mxResources.get("accessDenied"),retry:g}):g())}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,e){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+
+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&ver=2&token="+a),k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=
+mxUtils.bind(this,function(a,k){if(f){window.onOneDriveCallback=null;f=!1;try{null==a?c({message:mxResources.get("accessDenied"),retry:g}):(null!=e&&e(),this.setUser(null),this.token=a.access_token,a.expiresOn=Date.now()+1E3*a.expires_in,this.tokenExpiresOn=a.expiresOn,a.remember=b,this.setPersistentToken(JSON.stringify(a),!b),this.resetTokenRefresh(a.expires_in),this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){d()}),c))}catch(q){c(q)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),
+k.focus())}),mxUtils.bind(this,function(){f&&(window.onOneDriveCallback=null,f=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};
+OneDriveClient.prototype.getAccountTypeAndEndpoint=function(a,d){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var b=JSON.parse(c.getText());0<b.webUrl.indexOf(".sharepoint.com")?this.endpointHint=b.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(g),!g.remember));
+a();return}}catch(f){}d({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),d)};
+OneDriveClient.prototype.executeRequest=function(a,d,c){var b=mxUtils.bind(this,function(g){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:b})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);f&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(a)):g||401!==a.getStatus()&&400!==a.getStatus()?c(this.parseRequestText(a)):this.authenticate(function(){b(!0)},
+c,g))}),mxUtils.bind(this,function(a){window.clearTimeout(l);f&&c(a)}))});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},c):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var d=a.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:a}};
+OneDriveClient.prototype.getItemURL=function(a,d){var c=a.split("/");return 1<c.length?(d?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(d?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(a){var d=a.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<d&&(a=a.substring(0,d));return a};
+OneDriveClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),f=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,d,c);else{var e=!0,k=window.setTimeout(mxUtils.bind(this,
+function(){e=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(k),e){/\.html$/i.test(b.name)&&(a=this.removeExtraHtmlContent(a));var l=f?a.lastIndexOf(","):-1,m=null;if(0<l){var n=this.ui.extractGraphModelFromPng(a.substring(l+1));null!=n&&0<n.length?a=n:m=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var t=a.substring(22);a=window.atob&&
+!mxClient.IS_SF?atob(t):Base64.decode(t)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=c)c(y);else throw y;}}),b.name):null!=m?d(m):g?d(new OneDriveLibrary(this.ui,
+a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(a){window.clearTimeout(k);e&&c(this.parseRequestText(a))}),f||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
+OneDriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&(this.isValidFilename(d)?this.checkExists(a.getParentId(),d,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
+OneDriveClient.prototype.moveFile=function(a,d,c,b){d=this.getItemRef(d);var g=this.getItemRef(a);d.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:d}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)};
+OneDriveClient.prototype.insertFile=function(a,d,c,b,g,f){this.isValidFilename(a)?(g=null!=g?g:!1,this.checkExists(f,a,!0,mxUtils.bind(this,function(l){l?(l="/me/drive/root",null!=f&&(l=this.getItemURL(f,!0)),l=this.baseUrl+l+"/children/"+encodeURIComponent(a)+"/content",this.writeFile(l,d,"PUT",null,mxUtils.bind(this,function(a){g?c(new OneDriveLibrary(this.ui,d,a)):c(new OneDriveFile(this.ui,d,a))}),b)):b()}))):b({message:this.invalidFilenameRegExs[0].test(a)?mxResources.get("oneDriveCharsNotAllowed"):
mxResources.get("oneDriveInvalidDeviceName")})};
-OneDriveClient.prototype.checkExists=function(a,e,c,b){var k="/me/drive/root";null!=a&&(k=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+k+"/children/"+encodeURIComponent(e),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[e]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
-!0)};OneDriveClient.prototype.saveFile=function(a,e,c,b){try{var k=a.getData(),f=mxUtils.bind(this,function(d){var f=this.getItemURL(a.getId());this.writeFile(f+"/content/",d,"PUT",null,mxUtils.bind(this,function(a){e(a,k)}),c,b)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var l=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?k:null,l.scale,l.border)}else f(k)}catch(d){c(d)}};
-OneDriveClient.prototype.writeFile=function(a,e,c,b,k,f,l){try{if(null!=a&&null!=e)if(4E6<=e.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 4 MB)"});else{var d=mxUtils.bind(this,function(g){try{var m=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){m=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(t){}var p=new mxXmlRequest(a,e,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
-"Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(n);m&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(a.getText()))):g||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){d(!0)},f,g))}),mxUtils.bind(this,function(a){window.clearTimeout(n);m&&f(this.parseRequestText(a))}))}catch(t){f(t)}});null==this.token||6E4>this.tokenExpiresOn-
-Date.now()?this.authenticate(function(){d(!0)},f):d(!1)}else f({message:mxResources.get("unknownError")})}catch(g){f(g)}};OneDriveClient.prototype.parseRequestText=function(a){var e={message:mxResources.get("unknownError")};try{e=JSON.parse(a.getText())}catch(c){}return e};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(e){a(e)})};
-OneDriveClient.prototype.pickFolder=function(a,e){var c=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
-error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){c(!1)}),this.emptyFn):c(e)};
-OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});var 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",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&
-(mxClient.IS_IE11&&(this.token=c.accessToken),a(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:mxUtils.bind(this,function(){}),error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){e();this.ui.hideDialog()}))).container,
-300,140,!0,!0)}),this.emptyFn):e()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.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.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;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.checkExists=function(a,d,c,b){var g="/me/drive/root";null!=a&&(g=this.getItemURL(a,!0));this.executeRequest(this.baseUrl+g+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(a){404==a.getStatus()?b(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){b(!0)},function(){b(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)}))}),function(a){b(!1)},
+!0)};OneDriveClient.prototype.saveFile=function(a,d,c,b){try{var g=a.getData(),f=mxUtils.bind(this,function(f){var e=this.getItemURL(a.getId());this.writeFile(e+"/content/",f,"PUT",null,mxUtils.bind(this,function(a){d(a,g)}),c,b)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)){var l=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){f(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=a?g:null,l.scale,l.border)}else f(g)}catch(n){c(n)}};
+OneDriveClient.prototype.writeFile=function(a,d,c,b,g,f,l){try{if(null!=a&&null!=d)if(4E6<=d.length)f({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 4 MB)"});else{var n=mxUtils.bind(this,function(e){try{var k=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){k=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var p=new mxXmlRequest(a,d,c);p.setRequestHeaders=mxUtils.bind(this,function(a,c){a.setRequestHeader("Content-Type",b||" ");a.setRequestHeader("Authorization",
+"Bearer "+this.token);null!=l&&a.setRequestHeader("If-Match",l)});p.send(mxUtils.bind(this,function(a){window.clearTimeout(m);k&&(200<=a.getStatus()&&299>=a.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(a.getText()))):e||401!==a.getStatus()?f(this.parseRequestText(a),a):this.authenticate(function(){n(!0)},f,e))}),mxUtils.bind(this,function(a){window.clearTimeout(m);k&&f(this.parseRequestText(a))}))}catch(q){f(q)}});null==this.token||6E4>this.tokenExpiresOn-
+Date.now()?this.authenticate(function(){n(!0)},f):n(!1)}else f({message:mxResources.get("unknownError")})}catch(e){f(e)}};OneDriveClient.prototype.parseRequestText=function(a){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(a.getText())}catch(c){}return d};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(d){a(d)})};
+OneDriveClient.prototype.pickFolder=function(a,d){var c=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(b){a(b);mxClient.IS_IE11&&(this.token=b.accessToken)}),cancel:mxUtils.bind(this,function(){}),
+error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})});b?c():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){a({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),c,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){c(!1)}),this.emptyFn):c(d)};
+OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});var d=mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:this.token,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&
+(mxClient.IS_IE11&&(this.token=c.accessToken),a(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:mxUtils.bind(this,function(){}),error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){d();this.ui.hideDialog()}))).container,
+300,140,!0,!0)}),this.emptyFn):d()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.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.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;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(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){a(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
-GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,e){this.peer.getFile(this.getId(),a,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,e){a.sha=e};
-GitHubFile.prototype.save=function(a,e,c,b,k,f){this.doSave(this.getTitle(),e,c,b,k,f)};GitHubFile.prototype.saveAs=function(a,e,c){this.doSave(a,e,c)};GitHubFile.prototype.doSave=function(a,e,c,b,k,f){var l=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=l;this.saveFile(a,!1,e,c,b,k,f)}),c,b,k])};
-GitHubFile.prototype.saveFile=function(a,e,c,b,k,f,l){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var d=mxUtils.bind(this,function(d){if(this.getTitle()==a)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var e=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,a);this.fileSaved(g,e,mxUtils.bind(this,function(){this.contentChanged();
-null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isConflict(a)?(this.inConflictState=!0,null!=b&&b({commitMessage:d})):null!=b&&b(a)}),f,d)}catch(p){if(this.savingFile=!1,null!=b)b(p);else throw p;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=l?d(l):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){d(a)}),b)}else null!=c&&c()};GitHubLibrary=function(a,e,c){GitHubFile.call(this,a,e,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,e){DrawioClient.call(this,a,e||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";
-GitHubClient.prototype.updateUser=function(a,e,c){var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),f=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),l=this.authToken+" "+this.token;f.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",l)};f.send(mxUtils.bind(this,function(){window.clearTimeout(k);b&&(401===f.getStatus()?c?e({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,
-function(){this.updateUser(a,e,!0)}),e)):200>f.getStatus()||300<=f.getStatus()?e({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(f.getText()))),a()))}),e)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
-GitHubClient.prototype.authenticate=function(a,e){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(l,d){if(b)if(window.onGitHubCallback=null,b=!1,null==l)e({message:mxResources.get("accessDenied"),retry:c});else{var g=mxUtils.bind(this,function(){var b=
-!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;e({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(g){window.clearTimeout(c);if(b)try{if(200>g.getStatus()||300<=g.getStatus())e({message:mxResources.get("cannotLogin")});else{null!=f&&f();var l=g.getText();this.token=l.substring(l.indexOf("=")+1,l.indexOf("&"));this.setUser(null);k&&this.setPersistentToken(this.token);a()}}catch(u){e(u)}finally{null!=d&&
-d.close()}}))});g()}else null!=d&&d.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,e){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(e=c.message)}catch(b){}return e};
-GitHubClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({code:a.getStatus(),
-message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(t){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
-c({code:a.getStatus(),status:409}):c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};GitHubClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!0)};
-GitHubClient.prototype.getSha=function(a,e,c,b,k,f){var l="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+c+"?ref="+b+l,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{k(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){f(g)}}),f)};
-GitHubClient.prototype.getFile=function(a,e,c,b,k){b=null!=b?b:!1;var f=a.split("/"),l=f[0],d=f[1],g=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){k=this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g;var m={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(k,0<f.length?f[f.length-1]:a,null,this.extension,e,c,null,m)}else c({message:mxResources.get("accessDenied")});
-else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+d+"/contents/"+a+"?ref="+g+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{e(this.createGitHubFile(l,d,g,JSON.parse(a.getText()),b))}catch(p){c(p)}}),c)};
-GitHubClient.prototype.createGitHubFile=function(a,e,c,b,k){a={org:a,repo:e,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};e=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?e="data:image/jpeg;base64,"+e:/\.gif$/i.test(b.name)?e="data:image/gif;base64,"+e:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(e),e=null!=b&&0<b.length?b:"data:image/png;base64,"+e):e=Base64.decode(e));return k?new GitHubLibrary(this.ui,e,a):new GitHubFile(this.ui,
-e,a)};GitHubClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k,!1)};
-GitHubClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");var d=f[0],g=f[1],m=f[2],n=f.slice(3,f.length).join("/");0<n.length&&(n+="/");n+=a;this.checkExists(d+"/"+g+"/"+m+"/"+n,!0,mxUtils.bind(this,function(f,t){f?k?(l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(d,g,m,n,a,e,t,mxUtils.bind(this,function(a){try{var e=JSON.parse(a.getText());c(this.createGitHubFile(d,g,m,e.content,k))}catch(x){b(x)}}),b)}),b)):c(new GitHubFile(this.ui,
-e,{org:d,repo:g,ref:m,name:a,path:n,sha:t,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,e,c,b){var k=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){k();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){f.length>=this.maxFileSize?g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:k,content:f},null!=l&&(c.sha=l),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+e+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
-this.clientId,a.code=null);g(a)})))};
-GitHubClient.prototype.checkExists=function(a,e,c){var b=a.split("/"),k=b[0],f=b[1],l=b[2];a=b.slice(3,b.length).join("/");this.getSha(k,f,a,l,mxUtils.bind(this,function(b){if(e){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){d();c(!0,b)},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(a){c(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,e,c,b,k){var f=a.meta.org,l=a.meta.repo,d=a.meta.ref,g=a.meta.path,m=mxUtils.bind(this,function(b,m){this.writeFile(f,l,d,g,k,m,b,mxUtils.bind(this,function(b){delete a.meta.isNew;e(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){c(a)}))}),n=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(g)){var b=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,
-b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else m(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,l,g,d,mxUtils.bind(this,function(b){a.meta.sha=b;n()}),c):n()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
-"border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
-null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
-"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=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 z=mxUtils.bind(this,function(){x(d+1)});mxEvent.addListener(q,"click",
-z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(t(),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var z=!0,B=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l,n){if(d==("dir"==l.type)){var v=m.cloneNode();v.style.backgroundColor=
-z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==l.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;v.appendChild(q);v.appendChild(p(l.name+("dir"==l.type?"/":""),mxUtils.bind(this,function(){"dir"==l.type?(f=l.path,x()):a&&"file"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+l.path))})));g.appendChild(v);B++}})(n[l],l)});l(!0);a&&l(!1)}}),
-u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=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 e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,
-mxUtils.bind(this,function(){k=a.name;f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),u)}),A=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&mxEvent.removeListener(g,"scroll",
-v);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 e=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(g,mxResources.get("noFiles"));else{1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=k=null,y()):this.ui.spinner.spin(g,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;k=decodeURIComponent(a.meta.ref);f="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";e.appendChild(p(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=
-a.name;k=a.default_branch;f="";x()})));g.appendChild(e)})(d[l],l)}100==d.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}),u)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,e,c){DrawioFile.call(this,a,e);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
-TrelloFile.prototype.save=function(a,e,c){this.doSave(this.getTitle(),e,c)};TrelloFile.prototype.saveAs=function(a,e,c){this.doSave(a,e,c)};TrelloFile.prototype.doSave=function(a,e,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=b;this.saveFile(a,!1,e,c)}),c])};
-TrelloFile.prototype.saveFile=function(a,e,c,b){this.isEditable()?this.savingFile?null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,e,c,b))}),mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=b&&b(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,e,c,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,k)}))):null!=c&&c()};TrelloLibrary=function(a,e,c){TrelloFile.call(this,a,e,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
-TrelloClient.prototype.authenticate=function(a,e,c){c&&this.logout();c=mxUtils.bind(this,function(b,c){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=c&&c();a()},error:function(){null!=c&&c();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?c(!0):this.ui.showAuthDialog(this,!0,c)};TrelloClient.prototype.getLibrary=function(a,e,c){this.getFile(a,e,c,!1,!0)};
-TrelloClient.prototype.getFile=function(a,e,c,b,k){k=null!=k?k:!1;var f=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(g);if(d){var l=/\.png$/i.test(b.name);/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&l?this.ui.convertFile(PROXY_URL+"?url="+
-encodeURIComponent(b.url),b.name,b.mimeType,this.extension,e,c):(d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(c){window.clearTimeout(g);if(d){b.compoundId=a;var f=l?c.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+1)),null!=f&&0<f.length&&(c=f));k?e(new TrelloLibrary(this.ui,c,b)):e(new TrelloFile(this.ui,c,b))}}),mxUtils.bind(this,
-function(a,b){window.clearTimeout(g);d&&(401==b.status?this.authenticate(f,c,!0):c())}),l||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&(null!=a&&401==a.status?this.authenticate(f,c,!0):c())}))});this.authenticate(f,c)};TrelloClient.prototype.insertLibrary=function(a,e,c,b,k){this.insertFile(a,e,c,b,!0,k)};
-TrelloClient.prototype.insertFile=function(a,e,c,b,k,f){k=null!=k?k:!1;var l=mxUtils.bind(this,function(){var d=mxUtils.bind(this,function(d){this.writeFile(a,d,f,mxUtils.bind(this,function(a){k?c(new TrelloLibrary(this.ui,e,a)):c(new TrelloFile(this.ui,e,a))}),b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){d(this.ui.base64ToBlob(a,"image/png"))}),b,e):d(e)});this.authenticate(l,b)};
-TrelloClient.prototype.saveFile=function(a,e,c){var b=a.meta.compoundId.split(this.SEPARATOR),k=mxUtils.bind(this,function(k){this.writeFile(a.meta.name,k,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){e(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(f,c,!0):c()}))},c)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,
-"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):k(a.getData())});this.authenticate(f,c)};
-TrelloClient.prototype.writeFile=function(a,e,c,b,k){if(null!=a&&null!=e)if(e.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var l=!0,d=window.setTimeout(mxUtils.bind(this,function(){l=!1;k({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),g=new FormData;g.append("key",Trello.key());g.append("token",Trello.token());g.append("file","string"===typeof e?new Blob([e]):e,a);g.append("name",
-a);var m=new XMLHttpRequest;m.responseType="json";m.onreadystatechange=mxUtils.bind(this,function(){if(4===m.readyState&&(window.clearTimeout(d),l))if(200==m.status){var a=m.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==m.status?this.authenticate(f,k,!0):k()});m.open("POST",this.baseUrl+"cards/"+c+"/attachments");m.send(g)});this.authenticate(f,k)}else k({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
-TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,e){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,e){var c=null,b="@me",k=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,a?mxResources.get("selectFile"):mxResources.get("selectCard"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.height=
-"194px";f.appendChild(d);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var g=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?"dark"==uiTheme?"#000":"#eee":"dark"==uiTheme?"":"#fff");var e=document.createElement("a");e.style.cursor="pointer";if(null!=c){var f=document.createElement("img");
-f.src=c.url;f.width=c.width;f.height=c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),m=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),n=mxUtils.bind(this,function(){k=0;d.innerHTML="";this.ui.spinner.spin(d,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(d);null==a||0==a.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){d.appendChild(g(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==
-b.status?this.authenticate(a,m,!0):null!=m&&m(b)}))});a()}),p=null,t=null,u=mxUtils.bind(this,function(f){null==f&&(k=0,d.innerHTML="",f=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",t);u(f+1)});mxEvent.addListener(p,"click",l);var q=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==f&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(d));for(var m=0;m<k.length;m++)mxUtils.bind(this,function(b){d.appendChild(g(b.name,mxUtils.bind(this,function(){a?(c=b.id,n()):(this.ui.hideDialog(),e(b.id))})))})(k[m]);100==k.length&&(d.appendChild(p),t=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&l()},mxEvent.addListener(d,"scroll",t))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(q,m,!0):null!=m&&m({message:a.responseText})}))});q()});u()};
-TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,e,c){GitHubFile.call(this,a,e,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink("https://gitlab.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
+GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(d){a(200<=d.getStatus()&&299>=d.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.isConflict=function(a){return null!=a&&409==a.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
+GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,d){this.peer.getFile(this.getId(),a,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,d){a.sha=d};
+GitHubFile.prototype.save=function(a,d,c,b,g,f){this.doSave(this.getTitle(),d,c,b,g,f)};GitHubFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};GitHubFile.prototype.doSave=function(a,d,c,b,g,f){var l=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=l;this.saveFile(a,!1,d,c,b,g,f)}),c,b,g])};
+GitHubFile.prototype.saveFile=function(a,d,c,b,g,f,l){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var n=mxUtils.bind(this,function(e){if(this.getTitle()==a)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(a){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,a);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged();
+null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isConflict(a)?(this.inConflictState=!0,null!=b&&b({commitMessage:e})):null!=b&&b(a)}),f,e)}catch(p){if(this.savingFile=!1,null!=b)b(p);else throw p;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(d){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,d,e)}))});null!=l?n(l):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){n(a)}),b)}else null!=c&&c()};GitHubLibrary=function(a,d,c){GitHubFile.call(this,a,d,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,d){DrawioClient.call(this,a,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";
+GitHubClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),f=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),l=this.authToken+" "+this.token;f.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",l)};f.send(mxUtils.bind(this,function(){window.clearTimeout(g);b&&(401===f.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,
+function(){this.updateUser(a,d,!0)}),d)):200>f.getStatus()||300<=f.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(f.getText()))),a()))}),d)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)};
+GitHubClient.prototype.authenticate=function(a,d){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(l,n){if(b)if(window.onGitHubCallback=null,b=!1,null==l)d({message:mxResources.get("accessDenied"),retry:c});else{var e=mxUtils.bind(this,function(){var b=
+!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+l,mxUtils.bind(this,function(e){window.clearTimeout(c);if(b)try{if(200>e.getStatus()||300<=e.getStatus())d({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){d(u)}finally{null!=n&&
+n.close()}}))});e()}else null!=n&&n.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,d){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(d=c.message)}catch(b){}return d};
+GitHubClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(l){var n=!0,e=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),k=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",k)};a.send(mxUtils.bind(this,function(){window.clearTimeout(e);if(n)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())l?c({code:a.getStatus(),
+message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===a.getStatus()){var k=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(k="too_large"==p.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()?
+c({code:a.getStatus(),status:409}):c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(e);n&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};GitHubClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!0)};
+GitHubClient.prototype.getSha=function(a,d,c,b,g,f){var l="&t="+(new Date).getTime();a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+c+"?ref="+b+l,null,"HEAD");this.executeRequest(a,mxUtils.bind(this,function(a){try{g(a.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(e){f(e)}}),f)};
+GitHubClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;var f=a.split("/"),l=f[0],n=f[1],e=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&f))if(null!=this.token){g=this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+a+"?ref="+e;var k={Authorization:"token "+this.token},f=a.split("/");this.ui.convertFile(g,0<f.length?f[f.length-1]:a,null,this.extension,d,c,null,k)}else c({message:mxResources.get("accessDenied")});
+else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+a+"?ref="+e+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{d(this.createGitHubFile(l,n,e,JSON.parse(a.getText()),b))}catch(p){c(p)}}),c)};
+GitHubClient.prototype.createGitHubFile=function(a,d,c,b,g){a={org:a,repo:d,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};d=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(b.name)?d="data:image/gif;base64,"+d:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(d),d=null!=b&&0<b.length?b:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,a):new GitHubFile(this.ui,
+d,a)};GitHubClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g,!1)};
+GitHubClient.prototype.insertFile=function(a,d,c,b,g,f,l){g=null!=g?g:!1;f=f.split("/");var n=f[0],e=f[1],k=f[2],m=f.slice(3,f.length).join("/");0<m.length&&(m+="/");m+=a;this.checkExists(n+"/"+e+"/"+k+"/"+m,!0,mxUtils.bind(this,function(f,q){f?g?(l||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,e,k,m,a,d,q,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());c(this.createGitHubFile(n,e,k,d.content,g))}catch(y){b(y)}}),b)}),b)):c(new GitHubFile(this.ui,
+d,{org:n,repo:e,ref:k,name:a,path:m,sha:q,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,d,c,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(d?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,d,c,b,g,f,l,n,e){f.length>=this.maxFileSize?e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:g,content:f},null!=l&&(c.sha=l),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
+this.clientId,a.code=null);e(a)})))};
+GitHubClient.prototype.checkExists=function(a,d,c){var b=a.split("/"),g=b[0],f=b[1],l=b[2];a=b.slice(3,b.length).join("/");this.getSha(g,f,a,l,mxUtils.bind(this,function(b){if(d){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();c(!0,b)},function(){e();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(a){c(!0)}),null,!0)};
+GitHubClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,l=a.meta.repo,n=a.meta.ref,e=a.meta.path,k=mxUtils.bind(this,function(b,k){this.writeFile(f,l,n,e,g,k,b,mxUtils.bind(this,function(b){delete a.meta.isNew;d(JSON.parse(b.getText()).content.sha)}),mxUtils.bind(this,function(a){c(a)}))}),m=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var b=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){k(a.meta.sha,
+b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else k(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,l,e,n,mxUtils.bind(this,function(b){a.meta.sha=b;m()}),c):m()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
+GitHubClient.prototype.showGitHubDialog=function(a,d){var c=null,b=null,g=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing=
+"border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";l.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var m=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(m.container,420,360,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var p=
+mxUtils.bind(this,function(a,b,c){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),q=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),mxUtils.bind(this,function(){f=
+null;x()}))));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()})))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,A()):this.ui.hideDialog()}))}),t=null,v=null,y=mxUtils.bind(this,function(l){null==l&&(e.innerHTML="",l=1);var n=new mxXmlRequest(this.baseUrl+
+"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+l,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){y(l+1)});mxEvent.addListener(t,"click",
+B);this.executeRequest(n,mxUtils.bind(this,function(m){this.ui.spinner.stop();1==l&&(q(),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(m.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var B=!0,z=0;m=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,function(m,n){if(l==("dir"==m.type)){var v=k.cloneNode();v.style.backgroundColor=
+B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==m.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;v.appendChild(q);v.appendChild(p(m.name+("dir"==m.type?"/":""),mxUtils.bind(this,function(){"dir"==m.type?(f=m.path,y()):a&&"file"==m.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+m.path))})));e.appendChild(v);z++}})(n[m],m)});m(!0);a&&m(!1)}}),
+u,!0)}),x=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");
+var l=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(t,"click",l);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(q(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,
+mxUtils.bind(this,function(){g=a.name;f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(t),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&l()},mxEvent.addListener(e,"scroll",v))}}),u)}),A=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&mxEvent.removeListener(e,"scroll",
+v);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(t,"click",l);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var k=d[1];3>d.length?(c=a,b=k,f=g=null,x()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+k+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var m=0;m<d.length;m++)mxUtils.bind(this,function(a,d){var l=k.cloneNode();l.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";l.appendChild(p(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=
+a.name;g=a.default_branch;f="";y()})));e.appendChild(l)})(d[m],m)}100==d.length&&(e.appendChild(t),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&l()},mxEvent.addListener(e,"scroll",v))}),u)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+TrelloFile.prototype.save=function(a,d,c){this.doSave(this.getTitle(),d,c)};TrelloFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};TrelloFile.prototype.doSave=function(a,d,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=b;this.saveFile(a,!1,d,c)}),c])};
+TrelloFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=c&&c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=b&&b(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,g)}))):null!=c&&c()};TrelloLibrary=function(a,d,c){TrelloFile.call(this,a,d,c)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
+TrelloClient.prototype.authenticate=function(a,d,c){c&&this.logout();c=mxUtils.bind(this,function(b,c){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:b?"never":"1hour",success:function(){null!=c&&c();a()},error:function(){null!=c&&c();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?c(!0):this.ui.showAuthDialog(this,!0,c)};TrelloClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)};
+TrelloClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;var f=mxUtils.bind(this,function(){var b=a.split(this.SEPARATOR),n=!0,e=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(b){window.clearTimeout(e);if(n){var k=/\.png$/i.test(b.name);/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||!this.ui.useCanvasForExport&&k?this.ui.convertFile(PROXY_URL+"?url="+
+encodeURIComponent(b.url),b.name,b.mimeType,this.extension,d,c):(n=!0,e=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b.url),mxUtils.bind(this,function(c){window.clearTimeout(e);if(n){b.compoundId=a;var f=k?c.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(c.substring(f+1)),null!=f&&0<f.length&&(c=f));g?d(new TrelloLibrary(this.ui,c,b)):d(new TrelloFile(this.ui,c,b))}}),mxUtils.bind(this,
+function(a,b){window.clearTimeout(e);n&&(401==b.status?this.authenticate(f,c,!0):c())}),k||null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(e);n&&(null!=a&&401==a.status?this.authenticate(f,c,!0):c())}))});this.authenticate(f,c)};TrelloClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)};
+TrelloClient.prototype.insertFile=function(a,d,c,b,g,f){g=null!=g?g:!1;var l=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(e){this.writeFile(a,e,f,mxUtils.bind(this,function(a){g?c(new TrelloLibrary(this.ui,d,a)):c(new TrelloFile(this.ui,d,a))}),b)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(this.ui.base64ToBlob(a,"image/png"))}),b,d):l(d)});this.authenticate(l,b)};
+TrelloClient.prototype.saveFile=function(a,d,c){var b=a.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(a.meta.name,g,b[0],function(a){Trello.del("cards/"+b[0]+"/attachments/"+b[1],mxUtils.bind(this,function(){d(a)}),mxUtils.bind(this,function(a){null!=a&&401==a.status?this.authenticate(f,c,!0):c()}))},c)}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){g(this.ui.base64ToBlob(a,
+"image/png"))}),c,this.ui.getCurrentFile()!=a?a.getData():null):g(a.getData())});this.authenticate(f,c)};
+TrelloClient.prototype.writeFile=function(a,d,c,b,g){if(null!=a&&null!=d)if(d.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;g({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),e=new FormData;e.append("key",Trello.key());e.append("token",Trello.token());e.append("file","string"===typeof d?new Blob([d]):d,a);e.append("name",
+a);var k=new XMLHttpRequest;k.responseType="json";k.onreadystatechange=mxUtils.bind(this,function(){if(4===k.readyState&&(window.clearTimeout(n),l))if(200==k.status){var a=k.response;a.compoundId=c+this.SEPARATOR+a.id;b(a)}else 401==k.status?this.authenticate(f,g,!0):g()});k.open("POST",this.baseUrl+"cards/"+c+"/attachments");k.send(e)});this.authenticate(f,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,d){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
+TrelloClient.prototype.showTrelloDialog=function(a,d){var c=null,b="@me",g=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,a?mxResources.get("selectFile"):mxResources.get("selectCard"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
+"194px";f.appendChild(n);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var e=mxUtils.bind(this,function(a,b,c){g++;var e=document.createElement("div");e.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==g%2?"dark"==uiTheme?"#000":"#eee":"dark"==uiTheme?"":"#fff");var d=document.createElement("a");d.style.cursor="pointer";if(null!=c){var f=document.createElement("img");
+f.src=c.url;f.width=c.width;f.height=c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";d.appendChild(f)}mxUtils.write(d,a);mxEvent.addListener(d,"click",b);e.appendChild(d);return e}),k=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),m=mxUtils.bind(this,function(){g=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(e("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){n.appendChild(e(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==
+b.status?this.authenticate(a,k,!0):null!=k&&k(b)}))});a()}),p=null,q=null,u=mxUtils.bind(this,function(f){null==f&&(g=0,n.innerHTML="",f=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",q);u(f+1)});mxEvent.addListener(p,"click",l);var t=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==f&&(n.appendChild(e(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n));for(var k=0;k<g.length;k++)mxUtils.bind(this,function(b){n.appendChild(e(b.name,mxUtils.bind(this,function(){a?(c=b.id,m()):(this.ui.hideDialog(),d(b.id))})))})(g[k]);100==g.length&&(n.appendChild(p),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&l()},mxEvent.addListener(n,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(t,k,!0):null!=k&&k({message:a.responseText})}))});t()});u()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,d,c){GitHubFile.call(this,a,d,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink("https://gitlab.com/"+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(a){return null!=a&&400==a.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};
-GitLabFile.prototype.setDescriptorEtag=function(a,e){a.last_commit_id=e};GitLabLibrary=function(a,e,c){GitLabFile.call(this,a,e,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,e,c){this.saveFile(a,!1,e,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";
-GitLabClient.prototype.authenticate=function(a,e){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(k,f){var l=window.location.href,l=l.substring(0,l.lastIndexOf("/")),l=encodeURIComponent(l+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+l+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
-function(d,g){b?(window.onGitLabCallback=null,b=!1,null==d?e({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.token=d,this.setUser(null),k&&this.setPersistentToken(this.token),a())):null!=g&&g.close()}):e({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,e({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else e({code:App.ERROR_BUSY})};
-GitLabClient.prototype.executeRequest=function(a,e,c,b){var k=mxUtils.bind(this,function(l){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",m);a.setRequestHeader("PRIVATE_TOKEN",m);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(g);if(d)if(200<=
-a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())e(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===a.getStatus()){var m=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(m="too_large"==p.errors[0].code)}catch(t){}c({message:mxResources.get(m?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
-mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(g);d&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):k(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};
-GitLabClient.prototype.getRefIndex=function(a,e,c,b,k,f){if(null!=k)c(a,k);else{var l=a.length-2,d=mxUtils.bind(this,function(){if(2>l)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(l-1,0),k=a.slice(0,g).join("/"),g=a[g],n=a[l],p=a.slice(l+1,a.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+g)+"/repository/"+(e?f?"branches?per_page=1&page=1&ref="+n:"tree?path="+p+"&ref="+n:"files/"+encodeURIComponent(p)+"?ref="+n),t=new mxXmlRequest(k,null,"HEAD");this.executeRequest(t,
-mxUtils.bind(this,function(){200==t.getStatus()?c(a,l):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==t.getStatus()?(l--,d()):b({message:mxResources.get("fileNotFound")})}))}});d()}};
-GitLabClient.prototype.getFile=function(a,e,c,b,k,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,d){var g=Math.max(d-1,0),l=f.slice(0,g).join("/"),n=f[g],p=f[d];a=f.slice(d+1,f.length).join("/");g=/\.png$/i.test(a);if(!k&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&g))if(null!=this.token){var g="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+
-"?ref="+p;f=a.split("/");this.ui.convertFile(t+g,0<f.length?f[f.length-1]:a,null,this.extension,e,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else g="&t="+(new Date).getTime(),t=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,g=new mxXmlRequest(t+
-g,null,"GET"),this.executeRequest(g,mxUtils.bind(this,function(a){try{e(this.createGitLabFile(l,n,p,JSON.parse(a.getText()),b,d))}catch(q){c(q)}}),c)}),c,f)};
-GitLabClient.prototype.getFileContent=function(a){var e=a.file_name,c=a.content;"base64"===a.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)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
-GitLabClient.prototype.createGitLabFile=function(a,e,c,b,k,f){var l=DRAWIO_GITLAB_URL+"/";a={org:a,repo:e,ref:c,name:b.file_name,path:b.file_path,html_url:l+a+"/"+e+"/blob/"+c+"/"+b.file_path,download_url:l+a+"/"+e+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return k?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
-GitLabClient.prototype.insertFile=function(a,e,c,b,k,f,l){k=null!=k?k:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(d,f){var g=Math.max(f-1,0),n=d.slice(0,g).join("/"),p=d[g],t=d[f];path=d.slice(f+1,d.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+t+"/"+path,!0,mxUtils.bind(this,function(d,g){if(d)if(k)l||(e=Base64.encode(e)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,t,path,a,e,g,mxUtils.bind(this,function(a){try{var d=
-JSON.parse(a.getText());c(this.createGitLabFile(n,p,t,d.content,k,f))}catch(z){b(z)}}),b)}),b);else{var m=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,e,{org:n,repo:p,ref:t,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+t+"/"+path,download_url:m+n+"/"+p+"/raw/"+t+"/"+path+"?inline=false",refPos:f,last_commit_id:g,isNew:!0}))}else b()}))}),b,null,4>=f.length)};
-GitLabClient.prototype.checkExists=function(a,e,c){this.getFile(a,mxUtils.bind(this,function(b){if(e){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){k();c(!0,b.getCurrentEtag())},function(){k();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(a){c(!0)}),null,!0)};
-GitLabClient.prototype.writeFile=function(a,e,c,b,k,f,l,d,g){if(f.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var m="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:k,content:f,encoding:"base64"};null!=l&&(c.last_commit_id=l,m="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+e)+"/repository/files/"+encodeURIComponent(b);m=new mxXmlRequest(a,JSON.stringify(c),m);this.executeRequest(m,
-mxUtils.bind(this,function(a){d(a)}),g)}};
-GitLabClient.prototype.saveFile=function(a,e,c,b,k){var f=a.meta.org,l=a.meta.repo,d=a.meta.ref,g=a.meta.path,m=mxUtils.bind(this,function(b,m){this.writeFile(f,l,d,g,k,m,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(f+"/"+l+"/"+d+"/"+g,mxUtils.bind(this,function(b){b.getData()==a.getData()?e(b.getCurrentEtag()):e({content:a.getCurrentEtag()})}),c,null,null,a.meta.refPos)}),c)}),n=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(g)){var b=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else m(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(f+"/"+l+"/"+d+"/"+g,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;n()}),c):n()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};
+GitLabFile.prototype.setDescriptorEtag=function(a,d){a.last_commit_id=d};GitLabLibrary=function(a,d,c){GitLabFile.call(this,a,d,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";
+GitLabClient.prototype.authenticate=function(a,d){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){var l=window.location.href,l=l.substring(0,l.lastIndexOf("/")),l=encodeURIComponent(l+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+l+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,
+function(l,e){b?(window.onGitLabCallback=null,b=!1,null==l?d({message:mxResources.get("accessDenied"),retry:c}):(null!=f&&f(),this.token=l,this.setUser(null),g&&this.setPersistentToken(this.token),a())):null!=e&&e.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitLabCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};
+GitLabClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(l){var n=!0,e=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),k=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",k);a.setRequestHeader("PRIVATE_TOKEN",k);a.setRequestHeader("Content-Type","application/json")};a.send(mxUtils.bind(this,function(){window.clearTimeout(e);if(n)if(200<=
+a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())l?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===a.getStatus()){var k=!1;try{var p=JSON.parse(a.getText());null!=p&&null!=p.errors&&0<p.errors.length&&(k="too_large"==p.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({message:this.getErrorMessage(a,
+mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("error")+" "+a.getStatus())})}),mxUtils.bind(this,function(a){window.clearTimeout(e);n&&c(a)}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},c,a):g(a)});null==this.token?this.authenticate(function(){f(!0)},c):f(!1)};
+GitLabClient.prototype.getRefIndex=function(a,d,c,b,g,f){if(null!=g)c(a,g);else{var l=a.length-2,n=mxUtils.bind(this,function(){if(2>l)b({message:mxResources.get("fileNotFound")});else{var e=Math.max(l-1,0),g=a.slice(0,e).join("/"),e=a[e],m=a[l],p=a.slice(l+1,a.length).join("/"),g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+e)+"/repository/"+(d?f?"branches?per_page=1&page=1&ref="+m:"tree?path="+p+"&ref="+m:"files/"+encodeURIComponent(p)+"?ref="+m),q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,
+mxUtils.bind(this,function(){200==q.getStatus()?c(a,l):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(l--,n()):b({message:mxResources.get("fileNotFound")})}))}});n()}};
+GitLabClient.prototype.getFile=function(a,d,c,b,g,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,n){var e=Math.max(n-1,0),k=f.slice(0,e).join("/"),l=f[e],p=f[n];a=f.slice(n+1,f.length).join("/");e=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&e))if(null!=this.token){var e="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+l)+"/repository/files/"+encodeURIComponent(a)+
+"?ref="+p;f=a.split("/");this.ui.convertFile(q+e,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),c)}))}else c({message:mxResources.get("accessDenied")});else e="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+l)+"/repository/files/"+encodeURIComponent(a)+"?ref="+p,e=new mxXmlRequest(q+
+e,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(k,l,p,JSON.parse(a.getText()),b,n))}catch(t){c(t)}}),c)}),c,f)};
+GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
+GitLabClient.prototype.createGitLabFile=function(a,d,c,b,g,f){var l=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:c,name:b.file_name,path:b.file_path,html_url:l+a+"/"+d+"/blob/"+c+"/"+b.file_path,download_url:l+a+"/"+d+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return g?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
+GitLabClient.prototype.insertFile=function(a,d,c,b,g,f,l){g=null!=g?g:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(f,e){var k=Math.max(e-1,0),m=f.slice(0,k).join("/"),n=f[k],q=f[e];path=f.slice(e+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(m+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(f,k){if(f)if(g)l||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,q,path,a,d,k,mxUtils.bind(this,function(a){try{var d=
+JSON.parse(a.getText());c(this.createGitLabFile(m,n,q,d.content,g,e))}catch(B){b(B)}}),b)}),b);else{var p=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:m,repo:n,ref:q,name:a,path:path,html_url:p+m+"/"+n+"/blob/"+q+"/"+path,download_url:p+m+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:e,last_commit_id:k,isNew:!0}))}else b()}))}),b,null,4>=f.length)};
+GitLabClient.prototype.checkExists=function(a,d,c){this.getFile(a,mxUtils.bind(this,function(b){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();c(!0,b.getCurrentEtag())},function(){g();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(a){c(!0)}),null,!0)};
+GitLabClient.prototype.writeFile=function(a,d,c,b,g,f,l,n,e){if(f.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var k="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:g,content:f,encoding:"base64"};null!=l&&(c.last_commit_id=l,k="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(b);k=new mxXmlRequest(a,JSON.stringify(c),k);this.executeRequest(k,
+mxUtils.bind(this,function(a){n(a)}),e)}};
+GitLabClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,l=a.meta.repo,n=a.meta.ref,e=a.meta.path,k=mxUtils.bind(this,function(b,k){this.writeFile(f,l,n,e,g,k,b,mxUtils.bind(this,function(b){delete a.meta.isNew;this.getFile(f+"/"+l+"/"+n+"/"+e,mxUtils.bind(this,function(b){b.getData()==a.getData()?d(b.getCurrentEtag()):d({content:a.getCurrentEtag()})}),c,null,null,a.meta.refPos)}),c)}),m=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e)){var b=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){k(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null,b.scale,b.border)}else k(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(f+"/"+l+"/"+n+"/"+e,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;m()}),c):m()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};
GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)};
-GitLabClient.prototype.showGitLabDialog=function(a,e){var c=null,b=null,k=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var d=document.createElement("h3");mxUtils.write(d,mxResources.get(a?"selectFile":"selectFolder"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(d);var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.border="1px solid lightgray";g.style.boxSizing=
-"border-box";g.style.padding="4px";g.style.overflow="auto";g.style.lineHeight="1.2em";g.style.height="274px";l.appendChild(g);var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.padding="4px";m.style.width="100%";var n=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){e(c+"/"+b+"/"+encodeURIComponent(k)+"/"+f)}));this.ui.showDialog(n.container,420,360,!0,!0);a&&n.okButton.parentNode.removeChild(n.okButton);var p=
-mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=m.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),t=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(k),mxUtils.bind(this,function(){f=
-null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}g.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=k=b=c=null,A()):this.ui.hideDialog()}))}),q=null,v=null,x=mxUtils.bind(this,function(d){null==d&&(g.innerHTML="",d=1);var l=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+k+"&per_page=100&page="+d,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(g,"scroll",v),v=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 z=mxUtils.bind(this,function(){x(d+1)});mxEvent.addListener(q,
-"click",z);this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();1==d&&(t(!k),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var n=JSON.parse(l.getText());if(null==n||0==n.length)mxUtils.write(g,mxResources.get("noFiles"));else{var B=!0,C=0;l=mxUtils.bind(this,function(d){for(var l=0;l<n.length;l++)mxUtils.bind(this,function(l){if(d==("tree"==l.type)){var n=m.cloneNode();n.style.backgroundColor=
-B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==l.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(p(l.name+("tree"==l.type?"/":""),mxUtils.bind(this,function(){"tree"==l.type?(f=l.path,x()):a&&"blob"==l.type&&(this.ui.hideDialog(),e(c+"/"+b+"/"+k+"/"+l.path))})));g.appendChild(n);C++}})(n[l])});l(!0);a&&l(!1);100==C&&(g.appendChild(q),
-v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&z()},mxEvent.addListener(g,"scroll",v))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(g.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(g,"scroll",v),v=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 e=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(q,"click",e);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(t(!0),g.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(g,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,
-function(a,b){var c=m.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){k=encodeURIComponent(a.name);f="";x()})));g.appendChild(c)})(b[c],c);100==b.length&&(g.appendChild(q),v=function(){g.scrollTop>=g.scrollHeight-g.offsetHeight&&e()},mxEvent.addListener(g,"scroll",v))}}),u)});n.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(g,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){this.ui.spinner.stop();
-null==a&&(g.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(g,"scroll",v),v=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 d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(g,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");
-this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),l=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(g,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});e(mxUtils.bind(this,function(e){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+
-a,null,"GET");this.ui.spinner.spin(g,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=e&&0!=e.length){1==a&&(g.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],k="master",f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,
-a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(g),mxUtils.br(g));for(var z=0;z<n.length;z++)mxUtils.bind(this,function(a,d){var e=m.cloneNode();e.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";e.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=a.path;k=a.default_branch||"master";
-f="";x()})));g.appendChild(e)})(n[z],z);for(z=0;z<e.length;z++)l(e[z],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var l=m.cloneNode();l.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;k=d.default_branch||"master";f="";x()})));g.appendChild(l)})(d[e])}}))}else mxUtils.write(g,mxResources.get("noFiles"));100==n.length&&(g.appendChild(q),v=function(){g.scrollTop>=
-g.scrollHeight-g.offsetHeight&&d()},mxEvent.addListener(g,"scroll",v))}),u)}))});this.token?this.user?A():this.updateUser(function(){A()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,e,c,b,k,f,l){this.file=a;this.id=e;this.content=c;this.modifiedDate=b;this.createdDate=k;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,e,c,b,k){e()};DrawioComment.prototype.editComment=function(a,e,c){e()};DrawioComment.prototype.deleteComment=function(a,e){a()};DriveComment=function(a,e,c,b,k,f,l,d){DrawioComment.call(this,a,e,c,b,k,f,l);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,e,c,b,k){a={content:a.content};b?a.verb="resolve":k&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){e(a.replyId)}),c)};
-DriveComment.prototype.editComment=function(a,e,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},e,c)};
-DriveComment.prototype.deleteComment=function(a,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"},a,e)};App=function(a,e,c){EditorUi.call(this,a,e,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
+GitLabClient.prototype.showGitLabDialog=function(a,d){var c=null,b=null,g=null,f=null,l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.height="304px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(n);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.border="1px solid lightgray";e.style.boxSizing=
+"border-box";e.style.padding="4px";e.style.overflow="auto";e.style.lineHeight="1.2em";e.style.height="274px";l.appendChild(e);var k=document.createElement("div");k.style.textOverflow="ellipsis";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.padding="4px";k.style.width="100%";var m=new CustomDialog(this.ui,l,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(m.container,420,360,!0,!0);a&&m.okButton.parentNode.removeChild(m.okButton);var p=
+mxUtils.bind(this,function(a,b,c){var e=document.createElement("a");e.setAttribute("title",a);e.style.cursor="pointer";mxUtils.write(e,a);mxEvent.addListener(e,"click",b);null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(e),e=a);return e}),q=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(c+"/"+b,mxUtils.bind(this,function(){f=null;A()})));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),mxUtils.bind(this,function(){f=
+null;x()}))));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()})))})(a)}e.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,A()):this.ui.hideDialog()}))}),t=null,v=null,y=mxUtils.bind(this,function(l){null==l&&(e.innerHTML="",l=1);var n=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+l,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){y(l+1)});mxEvent.addListener(t,
+"click",B);this.executeRequest(n,mxUtils.bind(this,function(m){this.ui.spinner.stop();1==l&&(q(!g),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(m.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var z=!0,u=0;m=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,function(m){if(l==("tree"==m.type)){var n=k.cloneNode();n.style.backgroundColor=
+z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var B=document.createElement("img");B.src=IMAGE_PATH+"/"+("tree"==m.type?"folder.png":"file.png");B.setAttribute("align","absmiddle");B.style.marginRight="4px";B.style.marginTop="-4px";B.width=20;n.appendChild(B);n.appendChild(p(m.name+("tree"==m.type?"/":""),mxUtils.bind(this,function(){"tree"==m.type?(f=m.path,y()):a&&"blob"==m.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+m.path))})));e.appendChild(n);u++}})(n[m])});m(!0);a&&m(!1);100==u&&(e.appendChild(t),
+v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&B()},mxEvent.addListener(e,"scroll",v))}}),u,!0)}),x=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);
+t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(t,"click",l);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(q(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,
+function(a,b){var c=k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(t),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&l()},mxEvent.addListener(e,"scroll",v))}}),u)});m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){this.ui.spinner.stop();
+null==a&&(e.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(t,"click",d);var l=mxUtils.bind(this,function(a){this.ui.spinner.spin(e,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");
+this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),m=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(e,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});l(mxUtils.bind(this,function(l){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+
+a,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=l&&0!=l.length){1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],g="master",f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,
+a.length).join("/"))),y()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var z=0;z<n.length;z++)mxUtils.bind(this,function(a,d){var l=k.cloneNode();l.style.backgroundColor=0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";l.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=a.path;g=a.default_branch||"master";
+f="";y()})));e.appendChild(l)})(n[z],z);for(z=0;z<l.length;z++)m(l[z],mxUtils.bind(this,function(a,d){for(var l=0;l<d.length;l++){var m=k.cloneNode();m.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){m.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";y()})));e.appendChild(m)})(d[l])}}))}else mxUtils.write(e,mxResources.get("noFiles"));100==n.length&&(e.appendChild(t),v=function(){e.scrollTop>=
+e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",v))}),u)}))});this.token?this.user?A():this.updateUser(function(){A()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,l){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,l,n){DrawioComment.call(this,a,d,c,b,g,f,l);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
+DriveComment.prototype.editComment=function(a,d,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,c)};
+DriveComment.prototype.deleteComment=function(a,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"},a,d)};App=function(a,d,c){EditorUi.call(this,a,d,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(c.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(c)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+a.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,c,e){var b=null;try{b=window.open(a)}catch(d){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,c,e)).container,320,140,!0,!0):null!=c&&c()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,c,d){var b=null;try{b=window.open(a)}catch(n){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,c,d)).container,320,140,!0,!0):null!=c&&c()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(a){try{a(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=0,this.initializeEmbedMode())}),5E3)}this.load()};
App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL=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="https://code.jquery.com/jquery-1.7.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/4.3/pusher.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
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.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),c=0;c<e.length;c++){var b=mxUtils.trim(e[c]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
+App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),c=0;c<d.length;c++){var b=mxUtils.trim(d[c]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",a))}return a};
(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),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(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&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,e){function c(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!d[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},d={},f;for(f in App.pluginRegistry)d[App.pluginRegistry[f]]=!0;
-var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(x){window.location.hash="",alert(x)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
-Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,
+App.main=function(a,d){function c(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!e[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},e={},f;for(f in App.pluginRegistry)e[App.pluginRegistry[f]]=!0;
+var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(y){window.location.hash="",alert(y)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
+Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=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&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"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!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[b,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){a=document.getElementById("geStatus");null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||
mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function b(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var a=parseInt(mxSettings.settings.autosaveDelay);!isNaN(a)&&0<a?(DrawioFile.prototype.autosaveDelay=a,EditorUi.debug("Setting autosaveDelay",a)):EditorUi.debug("Invalid autosaveDelay",a)}null!=mxSettings.settings.defaultEdgeLength&&(a=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(a)&&0<a?(Graph.prototype.defaultEdgeLength=a,EditorUi.debug("Using defaultEdgeLength",
-a)):EditorUi.debug("Invalid defaultEdgeLength",a))}}catch(p){null!=window.console&&console.error(p)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError("Global: "+(null!=a?a:""),b,c,d,e,null,!0)};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){"1"==urlParams.dev&&null!=CryptoJS&&(k=document.getElementsByTagName("script"),null!=k&&0<k.length&&(k=mxUtils.getTextContent(k[0]),"5bf9ec4131db137e247634de78c4ec47"!=CryptoJS.MD5(k).toString()&&alert("[Dev] Script change requires update of CSP")));try{"serviceWorker"in navigator&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname)||
-"1"==urlParams.offline)&&("0"==urlParams.offline||"1"!=urlParams.offline&&"1"==urlParams.dev?navigator.serviceWorker.getRegistrations().then(function(a){for(var b=0;b<a.length;b++)a[b].unregister()}):(mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),mxStencilRegistry.allowEval=!1,window.addEventListener("load",function(){navigator.serviceWorker.register("/service-worker.js")})))}catch(n){null!=window.console&&console.error(n)}!("ArrayBuffer"in window)||
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_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 f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(k=f.plugins)}catch(n){}f=
-urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,d=0;d<k.length&&l;d++)"/"!=k[d].charAt(0)&&k[d].substring(0,f.length)!=f&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
-[k.join("\n")]).replace(/\\n/g,"\n")))for(d=0;d<k.length;d++)try{null==App.pluginsLoaded[k[d]]&&(App.pluginsLoaded[k[d]]=!0,App.embedModePluginsCount++,"/"==k[d].charAt(0)&&(k[d]=PLUGINS_BASE_PATH+k[d]),mxscript(k[d]))}catch(n){}}}"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,m=function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,a.data)}};mxEvent.addListener(window,"message",
-m);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(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(".configuration"),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(n){null!=
-window.console&&console.error(n)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
+a)):EditorUi.debug("Invalid defaultEdgeLength",a))}}catch(p){null!=window.console&&console.error(p)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,e,d){EditorUi.logError("Global: "+(null!=a?a:""),b,c,e,d,null,!0)};if("1"==urlParams.embed||"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==
+urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){"1"==urlParams.dev&&null!=CryptoJS&&(g=document.getElementsByTagName("script"),null!=g&&0<g.length&&(g=mxUtils.getTextContent(g[0]),"5bf9ec4131db137e247634de78c4ec47"!=CryptoJS.MD5(g).toString()&&alert("[Dev] Script change requires update of CSP")));try{"serviceWorker"in navigator&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname)||
+"1"==urlParams.offline)&&("0"==urlParams.offline||"1"!=urlParams.offline&&"1"==urlParams.dev?navigator.serviceWorker.getRegistrations().then(function(a){for(var b=0;b<a.length;b++)a[b].unregister()}):(mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),mxStencilRegistry.allowEval=!1,window.addEventListener("load",function(){navigator.serviceWorker.register("/service-worker.js")})))}catch(m){null!=window.console&&console.error(m)}!("ArrayBuffer"in window)||
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(g=f.plugins)}catch(m){}f=
+urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,n=0;n<g.length&&l;n++)"/"!=g[n].charAt(0)&&g[n].substring(0,f.length)!=f&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
+[g.join("\n")]).replace(/\\n/g,"\n")))for(n=0;n<g.length;n++)try{null==App.pluginsLoaded[g[n]]&&(App.pluginsLoaded[g[n]]=!0,App.embedModePluginsCount++,"/"==g[n].charAt(0)&&(g[n]=PLUGINS_BASE_PATH+g[n]),mxscript(g[n]))}catch(m){}}}"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 e=window.opener||window.parent,k=function(a){if(a.source==e)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",k),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(q){null!=window.console&&console.log("Error in configure message: "+q,a.data)}};mxEvent.addListener(window,"message",
+k);e.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(m){null!=window.console&&console.error(m)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(".configuration"),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(m){null!=
+window.console&&console.error(m)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+
@@ -10460,148 +10462,148 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";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(a){App.DrawPlugins.push(a)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(a,e){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=PLUGINS_BASE_PATH+App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(b):mxscript(b):e?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(k){null!=window.console&&console.log("Error loading plugin:",a[c],k)}};
+App.loadPlugins=function(a,d){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=PLUGINS_BASE_PATH+App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(b):mxscript(b):d?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(g){null!=window.console&&console.log("Error loading plugin:",a[c],g)}};
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 a=window.opener||window.parent;null!=a&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){a.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 a=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=a)});a()}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(f){null!=window.console&&console.error(f)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var c=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}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(f){null!=window.console&&console.error(f)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var c=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,a),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=c)});c()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=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(f){null!=window.console&&console.error(f)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=b)});b()}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&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(a){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){a.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 a=this.getCurrentFile(),a=null!=a?a.getMode():null;a!=App.MODE_DEVICE&&a!=App.MODE_BROWSER||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 k=
-window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(k)}))}}else null!=
+mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile(),a=null!=a?a.getMode():null;a!=App.MODE_DEVICE&&a!=App.MODE_BROWSER||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 g=
+window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(g)}))}}else null!=
this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display=
"none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};
App.prototype.scheduleSanityCheck=function(){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 a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&a.isOverdue()){var e={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=
-a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(e.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+
-"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(e);e=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(e=this.timeSince(a.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 a=this.getCurrentFile();if(null!=a&&a.isModified()&&a.isAutosave()&&a.isOverdue()){var d={category:"WARN-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=
+a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};a.constructor==DriveFile&&null!=a.desc&&null!=this.drive&&(d.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+a.desc.headRevisionId+
+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType);EditorUi.logEvent(d);d=mxResources.get("ensureDataSaved");null!=a.lastSaved&&(d=this.timeSince(a.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&&a.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"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.showDownloadDesktopBanner=function(){var a="https://get.draw.io/";this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink(a)}))&&mxUtils.get("https://api.github.com/repos/jgraph/drawio-desktop/releases/latest",mxUtils.bind(this,function(e){try{var c=JSON.parse(e.getText());null!=c&&null!=c.tag_name&&null!=c.name&&null!=c.html_url&&(mxClient.IS_MAC?a="https://github.com/jgraph/drawio-desktop/releases/download/"+c.tag_name+"/draw.io-"+
+App.prototype.showDownloadDesktopBanner=function(){var a="https://get.diagrams.net/";this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink(a)}))&&mxUtils.get("https://api.github.com/repos/jgraph/drawio-desktop/releases/latest",mxUtils.bind(this,function(d){try{var c=JSON.parse(d.getText());null!=c&&null!=c.tag_name&&null!=c.name&&null!=c.html_url&&(mxClient.IS_MAC?a="https://github.com/jgraph/drawio-desktop/releases/download/"+c.tag_name+"/draw.io-"+
c.name+".dmg":mxClient.IS_WIN&&(a="https://github.com/jgraph/drawio-desktop/releases/download/"+c.tag_name+"/draw.io-"+c.name+"-windows-installer.exe"))}catch(b){}}))};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var c=e.lastIndexOf("@"),b=e;0<=c&&(b=e.substring(c+1),e=Editor.crc32(e.substring(0,c))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var c=
-a.getText();if(0<c.length){var e=JSON.parse(c);null!=e&&this.handleLicense(e,b)}}}catch(d){}}))}};App.prototype.handleLicense=function(a,e){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var c=0;c<e.length;c++)e[c].id==a.id&&e.splice(c,1);null!=e&&(e.unshift(a),e=e.slice(0,10),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}};
-App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};
+App.prototype.checkLicense=function(){var a=this.drive.getUser(),d=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=d){var c=d.lastIndexOf("@"),b=d;0<=c&&(b=d.substring(c+1),d=Editor.crc32(d.substring(0,c))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(d)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=a.getStatus()&&299>=a.getStatus()){var c=
+a.getText();if(0<c.length){var d=JSON.parse(c);null!=d&&this.handleLicense(d,b)}}}catch(n){}}))}};App.prototype.handleLicense=function(a,d){null!=a&&null!=a.plugins&&App.loadPlugins(a.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var c=0;c<d.length;c++)d[c].id==a.id&&d.splice(c,1);null!=d&&(d.unshift(a),d=d.slice(0,10),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}};
+App.prototype.resetRecent=function(a){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 a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=a.fileHandle){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
-App.prototype.getThumbnail=function(a,e){var c=!1;try{var b=!0,k=window.setTimeout(mxUtils.bind(this,function(){b=!1;e(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(k);b&&e(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var l=this.editor.graph,d=null!=l.themes&&"darkTheme"==l.defaultThemeName;if(d||null!=this.pages&&this.currentPage!=this.pages[0]){var g=l.getGlobalVariable,l=this.createTemporaryGraph(d?l.getDefaultStylesheet():l.getStylesheet()),m=this.pages[0];
-d&&(l.defaultThemeName="default");l.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:g.apply(this,arguments)};l.getGlobalVariable=g;document.body.appendChild(l.container);l.model.setRoot(m.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(C){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},
-null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=l.getGraphBounds(),t=a/p.width,t=Math.min(1,Math.min(3*a/(4*p.height),t)),u=Math.floor(p.x),q=Math.floor(p.y);n.setAttribute("width",Math.ceil(t*(p.width+4)));n.setAttribute("height",Math.ceil(t*(p.height+4)));var v=n.getContext("2d");v.scale(t,t);v.translate(-u,-q);var x=l.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";v.save();v.fillStyle=x;v.fillRect(u,
-q,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var y=new mxJsCanvas(n),A=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var z=new mxImageExport;z.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};z.drawText=function(a,b){};z.drawState(l.getView().getState(l.model.root),A);A.finish(mxUtils.bind(this,function(){try{z.drawState(l.getView().getState(l.model.root),
-y),l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(B){n=null}f(n)}));c=!0}}catch(B){c=!1,null!=l&&l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}return c};
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}};
+App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var l=this.editor.graph,n=null!=l.themes&&"darkTheme"==l.defaultThemeName;if(n||null!=this.pages&&this.currentPage!=this.pages[0]){var e=l.getGlobalVariable,l=this.createTemporaryGraph(n?l.getDefaultStylesheet():l.getStylesheet()),k=this.pages[0];
+n&&(l.defaultThemeName="default");l.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:e.apply(this,arguments)};l.getGlobalVariable=e;document.body.appendChild(l.container);l.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(a){try{l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(C){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},
+null,null,null,null,null,null,l),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=l.getGraphBounds(),q=a/p.width,q=Math.min(1,Math.min(3*a/(4*p.height),q)),u=Math.floor(p.x),t=Math.floor(p.y);m.setAttribute("width",Math.ceil(q*(p.width+4)));m.setAttribute("height",Math.ceil(q*(p.height+4)));var v=m.getContext("2d");v.scale(q,q);v.translate(-u,-t);var y=l.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";v.save();v.fillStyle=y;v.fillRect(u,
+t,Math.ceil(p.width+4),Math.ceil(p.height+4));v.restore();var x=new mxJsCanvas(m),A=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var B=new mxImageExport;B.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};B.drawText=function(a,b){};B.drawState(l.getView().getState(l.model.root),A);A.finish(mxUtils.bind(this,function(){try{B.drawState(l.getView().getState(l.model.root),
+x),l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}catch(z){m=null}f(m)}));c=!0}}catch(z){c=!1,null!=l&&l!=this.editor.graph&&null!=l.container.parentNode&&l.container.parentNode.removeChild(l.container)}return c};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
-(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();e=null!=b?b.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(c)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+e+"; expires="+k.toUTCString()}}catch(f){}}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),c=null!=e?e.getMode():null;c==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(a)?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"):c==App.MODE_ONEDRIVE?null!=
-e&&null!=e.meta&&null!=e.meta.webUrl?(c=e.meta.webUrl,e=encodeURIComponent(e.meta.name),c.substring(c.length-e.length,c.length)==e&&(c=c.substring(0,c.length-e.length)),this.openLink(c)):this.openLink("https://onedrive.live.com/"):c==App.MODE_DROPBOX?null!=e&&null!=e.stat&&null!=e.stat.path_display?(c="https://www.dropbox.com/home/Apps/drawio"+e.stat.path_display,mxEvent.isShiftDown(a)||(c=c.substring(0,c.length-e.stat.name.length)),this.openLink(c)):this.openLink("https://www.dropbox.com/"):c==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):c==App.MODE_GITHUB?null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"):c==App.MODE_GITLAB?null!=e&&e.constructor==GitLabFile?this.openLink(e.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):c==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(a)};
-App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));if(null!=a&&1<a.length&&"T"==a.charAt(0)){var e=a.indexOf("#");0<e&&(a=a.substring(0,e))}return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(c){}};App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,a)};
+(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();d=null!=b?b.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(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+d+"; expires="+g.toUTCString()}}catch(f){}}})();
+App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var d=this.getCurrentFile(),c=null!=d?d.getMode():null;c==App.MODE_GOOGLE?null!=d&&null!=d.desc&&null!=d.desc.parents&&0<d.desc.parents.length&&!mxEvent.isShiftDown(a)?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"):c==App.MODE_ONEDRIVE?null!=
+d&&null!=d.meta&&null!=d.meta.webUrl?(c=d.meta.webUrl,d=encodeURIComponent(d.meta.name),c.substring(c.length-d.length,c.length)==d&&(c=c.substring(0,c.length-d.length)),this.openLink(c)):this.openLink("https://onedrive.live.com/"):c==App.MODE_DROPBOX?null!=d&&null!=d.stat&&null!=d.stat.path_display?(c="https://www.dropbox.com/home/Apps/drawio"+d.stat.path_display,mxEvent.isShiftDown(a)||(c=c.substring(0,c.length-d.stat.name.length)),this.openLink(c)):this.openLink("https://www.dropbox.com/"):c==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):c==App.MODE_GITHUB?null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"):c==App.MODE_GITLAB?null!=d&&d.constructor==GitLabFile?this.openLink(d.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):c==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(a)};
+App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));if(null!=a&&1<a.length&&"T"==a.charAt(0)){var d=a.indexOf("#");0<d&&(a=a.substring(0,d))}return a};
+App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var d=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,d){this.spinner.stop();null==b&&(b=urlParams.title,d=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,d))}))}}catch(c){}};App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,a)};
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(a){}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(a,e){if(!this.showingRefreshDialog&&(this.showingRefreshDialog=!0,this.showError(a||mxResources.get("externalChanges"),e||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.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)){var c=
+App.prototype.showRefreshDialog=function(a,d){if(!this.showingRefreshDialog&&(this.showingRefreshDialog=!0,this.showError(a||mxResources.get("externalChanges"),d||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.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)){var c=
this.createRealtimeNotice();c.style.left="0";c.style.right="0";c.style.borderRadius="0";c.style.borderLeftStyle="none";c.style.borderRightStyle="none";c.style.marginBottom="26px";c.style.padding="8px 0 8px 0";this.dialog.container.appendChild(c)}};
-App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
-mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});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)},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 a=this;window.onerror=function(b,c,d,e,k){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,e,k,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
+App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("title",mxResources.get("close"));a.innerHTML=
+mxResources.get("close");d.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(a))});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 a=this;window.onerror=function(b,c,d,e,g){EditorUi.logError("Uncaught: "+(null!=b?b:""),c,d,e,g,null,!0);a.handleError({message:b},mxResources.get("unknownError"),null,null,null,null,!0)};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(a){var b=this.getCurrentFile();
EditorUi.debug("storage event",a,b);null!=b&&".draft-alive-check"==a.key&&null!=a.newValue&&null!=b.draftId&&(this.draftAliveCheck=a.newValue,b.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(f){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{this.hideDialog();var b=this.getDiagramId(),
-c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(g){null!=document.body&&this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}}))}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||
+c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(e){null!=document.body&&this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}}))}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 a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),
-b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(g){}c?this.spinner.spin(document.body,
-mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var a=decodeURIComponent(urlParams.viewbox||"");if(""!=a)try{var b=JSON.parse(a);this.editor.graph.fitWindow(b,b.border)}catch(n){console.error(n)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
-this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,
+b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(e){}c?this.spinner.spin(document.body,
+mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,function(){var a=decodeURIComponent(urlParams.viewbox||"");if(""!=a)try{var b=JSON.parse(a);this.editor.graph.fitWindow(b,b.border)}catch(m){console.error(m)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=c&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var b=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),g=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,
a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);isLocalStorage&&a++;var c=4>=a?2:6<a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=c}else this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?k(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){k(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(f){this.handleError(f)}};
-App.prototype.loadDraft=function(a,e){this.createFile(this.defaultFilename,a,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.checkDrafts=function(){try{var a=Editor.guid();localStorage.setItem(".draft-alive-check",a);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var c=[],b=0;b<e.length;b++)try{var k=e[b].key;if(null!=k&&".draft_"==k.substring(0,7)){var f=JSON.parse(e[b].data);null!=f&&"draft"==f.type&&f.aliveCheck!=a&&(f.key=k,c.push(f))}}catch(l){}1==c.length?this.loadDraft(c[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[0].key)})):
-1<c.length?(e=new Date(c[0].modified),e=new DraftDialog(this,1<c.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<c.length?null:c[0].data,mxUtils.bind(this,function(a){this.hideDialog();a=""!=a?a:0;this.loadDraft(c[a].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key)}))}),mxUtils.bind(this,function(a,b){a=""!=a?a:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key);
-null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<c.length?c:null),this.showDialog(e.container,640,480,!0,!1,mxUtils.bind(this,function(a){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),e.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
-this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
-App.prototype.showSplash=function(a){var e=this.getServiceCount(!0),c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||mxClient.IS_ANDROID||
-mxClient.IS_IOS||this.mode!=App.MODE_DEVICE||this.showDownloadDesktopBanner()});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&&!a)null==urlParams.create&&c();else{a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();c()}),a);this.showDialog(b.container,3>a?200:300,3<e?320:210,!0,!1)}};
-App.prototype.addLanguageMenu=function(a,e){var c=null;if(null!=this.menus.get("language")){c=document.createElement("div");c.setAttribute("title",mxResources.get("language"));c.className="geIcon geSprite geSprite-globe";c.style.position="absolute";c.style.cursor="pointer";c.style.bottom="20px";c.style.right="20px";if(e){c.style.direction="rtl";c.style.textAlign="right";c.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";b.style.fontSize="12px";b.style.margin=
-"5px 24px 0 0";b.style.color="gray";b.style.userSelect="none";mxUtils.write(b,mxResources.get("language"));c.appendChild(b)}mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(c);
-b.popup(e.x,e.y+c.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(c)}return c};
-App.prototype.loadFileSystemEntry=function(a,e,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});a.getFile().then(mxUtils.bind(this,function(b){var k=new FileReader;k.onload=mxUtils.bind(this,function(f){try{if(null!=e){var k=f.target.result;"image/"==b.type.substring(0,6)&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,b.name,null,a,b))}else this.openFileHandle(f.target.result,b.name,b,!1,a)}catch(d){c(d)}});k.onerror=c;"image"!==b.type.substring(0,5)&&"application/pdf"!==
-b.type||"image/svg"===b.type.substring(0,9)?k.readAsText(b):k.readAsDataURL(b)}),c)};
-App.prototype.createFileSystemOptions=function(a){var e=[],c=null;if(null!=a){var b=a.lastIndexOf(".");0<b&&(c=a.substring(b+1))}for(b=0;b<this.editor.diagramFileTypes.length;b++){var k={description:mxResources.get(this.editor.diagramFileTypes[b].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[b].extension+")":""),extensions:[this.editor.diagramFileTypes[b].extension]};this.editor.diagramFileTypes[b].extension==c?e.splice(0,0,k):e.push(k)}return{type:"save-file",accepts:e,fileName:a}};
-App.prototype.chooseFileSystemEntries=function(a,e,c){e=null!=e?e:mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)});c=null!=c?c:this.createFileSystemOptions();window.chooseFileSystemEntries(c).then(mxUtils.bind(this,function(b){b.getFile().then(mxUtils.bind(this,function(c){a(b,c)}),e)}),e)};
-App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==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(a);if(null!=e)e.pickFile();else if(a==App.MODE_DEVICE&&"chooseFileSystemEntries"in window)window.chooseFileSystemEntries().then(mxUtils.bind(this,function(a){this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(a)}),
+this.getFileData(!0),null,b,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(b.container,400,a>c?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?g(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){g(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),b)}))}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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),d())}}catch(f){this.handleError(f)}};
+App.prototype.loadDraft=function(a,d){this.createFile(this.defaultFilename,a,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a.fileChanged(),null!=d&&d())}),0)}),null,null,!0)};
+App.prototype.checkDrafts=function(){try{var a=Editor.guid();localStorage.setItem(".draft-alive-check",a);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(d){for(var c=[],b=0;b<d.length;b++)try{var g=d[b].key;if(null!=g&&".draft_"==g.substring(0,7)){var f=JSON.parse(d[b].data);null!=f&&"draft"==f.type&&f.aliveCheck!=a&&(f.key=g,c.push(f))}}catch(l){}1==c.length?this.loadDraft(c[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[0].key)})):
+1<c.length?(d=new Date(c[0].modified),d=new DraftDialog(this,1<c.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[d.toLocaleDateString()+" "+d.toLocaleTimeString()]),1<c.length?null:c[0].data,mxUtils.bind(this,function(a){this.hideDialog();a=""!=a?a:0;this.loadDraft(c[a].data,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key)}))}),mxUtils.bind(this,function(a,b){a=""!=a?a:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(c[a].key);
+null!=b&&b()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<c.length?c:null),this.showDialog(d.container,640,480,!0,!1,mxUtils.bind(this,function(a){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),d.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
+this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(d){}};
+App.prototype.showSplash=function(a){var d=this.getServiceCount(!0),c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||mxClient.IS_ANDROID||
+mxClient.IS_IOS||this.mode!=App.MODE_DEVICE||this.showDownloadDesktopBanner()});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&&!a)null==urlParams.create&&c();else{a=4==d?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();c()}),a);this.showDialog(b.container,3>a?200:300,3<d?320:210,!0,!1)}};
+App.prototype.addLanguageMenu=function(a,d){var c=null;if(null!=this.menus.get("language")){c=document.createElement("div");c.setAttribute("title",mxResources.get("language"));c.className="geIcon geSprite geSprite-globe";c.style.position="absolute";c.style.cursor="pointer";c.style.bottom="20px";c.style.right="20px";if(d){c.style.direction="rtl";c.style.textAlign="right";c.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";b.style.fontSize="12px";b.style.margin=
+"5px 24px 0 0";b.style.color="gray";b.style.userSelect="none";mxUtils.write(b,mxResources.get("language"));c.appendChild(b)}mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxUtils.getOffset(c);
+b.popup(d.x,d.y+c.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(c)}return c};
+App.prototype.loadFileSystemEntry=function(a,d,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});a.getFile().then(mxUtils.bind(this,function(b){var g=new FileReader;g.onload=mxUtils.bind(this,function(f){try{if(null!=d){var g=f.target.result;"image/"==b.type.substring(0,6)&&(g=this.extractGraphModelFromPng(g));d(new LocalFile(this,g,b.name,null,a,b))}else this.openFileHandle(f.target.result,b.name,b,!1,a)}catch(n){c(n)}});g.onerror=c;"image"!==b.type.substring(0,5)&&"application/pdf"!==
+b.type||"image/svg"===b.type.substring(0,9)?g.readAsText(b):g.readAsDataURL(b)}),c)};
+App.prototype.createFileSystemOptions=function(a){var d=[],c=null;if(null!=a){var b=a.lastIndexOf(".");0<b&&(c=a.substring(b+1))}for(b=0;b<this.editor.diagramFileTypes.length;b++){var g={description:mxResources.get(this.editor.diagramFileTypes[b].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[b].extension+")":""),extensions:[this.editor.diagramFileTypes[b].extension]};this.editor.diagramFileTypes[b].extension==c?d.splice(0,0,g):d.push(g)}return{type:"save-file",accepts:d,fileName:a}};
+App.prototype.chooseFileSystemEntries=function(a,d,c){d=null!=d?d:mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)});c=null!=c?c:this.createFileSystemOptions();window.chooseFileSystemEntries(c).then(mxUtils.bind(this,function(b){b.getFile().then(mxUtils.bind(this,function(c){a(b,c)}),d)}),d)};
+App.prototype.pickFile=function(a){try{if(a=null!=a?a:this.mode,a==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(a);if(null!=d)d.pickFile();else if(a==App.MODE_DEVICE&&"chooseFileSystemEntries"in window)window.chooseFileSystemEntries().then(mxUtils.bind(this,function(a){this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(a)}),
mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}));else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.openFiles(c.files),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.openFileInputElt=c}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(a,b){StorageFile.listFiles(this,"F",a,b)});window.openBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.getFileContent(this,a,b,c)});window.deleteBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.deleteFile(this,a,b,c)});var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var k=this.dialog,f=k.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=b;f.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(l){this.handleError(l)}};
-App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_GITLAB||a==App.MODE_TRELLO){var e=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(d){this.handleError(d,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=
-c.files){for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var g=this.dialog,f=g.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=b;f.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(l){this.handleError(l)}};
+App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_GITLAB||a==App.MODE_TRELLO){var d=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&d.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=
+c.files){for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
mxUtils.bind(this,function(a,b){StorageFile.listFiles(this,"L",a,b)});window.openBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.getFileContent(this,a,b,c)});window.deleteBrowserFile=mxUtils.bind(this,function(a,b,c){StorageFile.deleteFile(this,a,b,c)});var b=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==
App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=b;window.openFile=null})}};
-App.prototype.saveLibrary=function(a,e,c,b,k,f,l){try{b=null!=b?b:this.mode;k=null!=k?k:!1;f=null!=f?f:!1;var d=this.createLibraryDataFromImages(e),g=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&b==App.MODE_DEVICE&&(c=new LocalLibrary(this,d,a));if(null==c)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(a,d,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),g,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),g,c):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,
-d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),g,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),g,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,d,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,e)}),g,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),g,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,e)}),g)}),null==localStorage.getItem(a)?
-c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(d);var m=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(c,e);null!=l&&l()}),g)});if(a!=c.getTitle()){var n=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&n!=c.getHash()&&
-(mxSettings.removeCustomLibrary(n),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(n);m()}),g)}else m()}}catch(p){this.handleError(p)}};
-App.prototype.saveFile=function(a,e){var c=this.getCurrentFile();if(null!=c){var b=mxUtils.bind(this,function(){EditorUi.enableDrafts&&c.removeDraft();this.getCurrentFile()==c||c.isModified()||(c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(a||null==c.getTitle()||null==this.mode)if(null!=c&&c.constructor==LocalFile&&null!=c.fileHandle)this.chooseFileSystemEntries(mxUtils.bind(this,function(a,
-d){c.fileHandle=a;c.title=d.name;c.desc=d;this.save(d.name,b)}),null,this.createFileSystemOptions(c.getTitle()));else{var k=null!=c.getTitle()?c.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,l=this.mode,d=this.getServiceCount(!0);isLocalStorage&&d++;var g=4>=d?2:6<d?4:3,k=new CreateDialog(this,k,mxUtils.bind(this,function(a,d,e){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();
-this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){e.value=a.split(".").slice(0,-1).join(".");e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==l&&d==App.MODE_DEVICE?null!=c&&"chooseFileSystemEntries"in window?this.chooseFileSystemEntries(mxUtils.bind(this,function(a,d){c.fileHandle=a;c.mode=App.MODE_DEVICE;c.title=d.name;
-c.desc=d;this.setMode(App.MODE_DEVICE);this.save(d.name,b)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}),this.createFileSystemOptions(a)):(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==d?(new LocalFile(this,null,a)).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)):l!=d?this.pickFolder(d,mxUtils.bind(this,function(c){this.createFile(a,
-this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,d,b,null==this.mode,c)})):null!=d&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,null,!0,g,null,null,null,this.editor.fileExtensions,!1);this.showDialog(k.container,400,d>g?390:270,!0,!0);k.init()}else this.save(c.getTitle(),b)}};
-App.prototype.loadTemplate=function(a,e,c,b,k){var f=!1,l=a;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+l,f=!0);var d=null!=b?b:a;this.editor.loadUrl(l,mxUtils.bind(this,function(b){try{var g=f?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b,l=/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d);if(l||this.isVisioData(g))l||(d=k?this.isRemoteVisioData(g)?"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?
-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)},c,d);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,d))this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a);else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(a){e(a)}),
-mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(d)||this.isPngData(g))g=this.extractGraphModelFromPng(b);e(g)}}catch(p){c(p)}}),c,/(\.png)($|\?)/i.test(d)||/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d),null,null,f)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,e,c,b,k,f,l,d,g){b=d?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),n=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==l&&null!=this.stateArg&&null!=this.stateArg.folderId&&(l=this.stateArg.folderId),
-this.drive.insertFile(a,e,l,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,
-c,f,k,g)}),n,!1,l);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){m();this.fileCreated(a,c,f,k,g)}),n,!1,l);else if(b==App.MODE_BROWSER){m();var p=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,k,g)}),n)});null==localStorage.getItem(a)?
-p():this.confirm(mxResources.get("replaceIt",[a]),p,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else!d&&b==App.MODE_DEVICE&&"chooseFileSystemEntries"in window?(m(),this.chooseFileSystemEntries(mxUtils.bind(this,function(a,b){var d=new LocalFile(this,e,b.name,null,a,b);d.saveFile(b.name,!1,mxUtils.bind(this,function(){this.fileCreated(d,c,f,k,g)}),n,!0)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&n(a)}),this.createFileSystemOptions(a))):
-(m(),this.fileCreated(new LocalFile(this,e,a,null==b),c,f,k,g))}catch(t){m(),this.handleError(t)}}};
-App.prototype.fileCreated=function(a,e,c,b,k){var f=window.location.pathname;null!=e&&0<e.length&&(f+="?libs="+e);null!=k&&0<k.length&&(f+="?clibs="+k);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var l=a.getData(),l=0<l.length?this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0):null,d=window.location.protocol+"//"+window.location.hostname+f,g=l,m=null;null!=l&&/\.svg$/i.test(a.getTitle())&&
-(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),g=this.decodeNodeIntoGraph(g,m));a.setData(this.createFileData(l,m,a,d));null!=m&&m.container.parentNode.removeChild(m.container);var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){n();var d=this.getCurrentFile();null==c&&null!=d&&(c=!d.isModified()&&null==d.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var b=[],d=k.split(";"),f=0;f<d.length;f++)b.push(decodeURIComponent(d[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){c||null==d||!d.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
-null==a.getMode())),null!=b&&b(),window.openWindow(f,null,l))});a.constructor==LocalFile?p():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(a){n();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,e,c,b,k){this.hideDialog();var f=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage){var d=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));
-StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):d({message:mxResources.get("fileNotFound")})}),d)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=c)this.spinner.stop(),this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop();
+App.prototype.saveLibrary=function(a,d,c,b,g,f,l){try{b=null!=b?b:this.mode;g=null!=g?g:!1;f=null!=f?f:!1;var n=this.createLibraryDataFromImages(d),e=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==c&&b==App.MODE_DEVICE&&(c=new LocalLibrary(this,n,a));if(null==c)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(a,n,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),e,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),e,c):b==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(a,
+n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),e,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),e,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,d)}),e,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,d)}),e,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,d)}),e)}),null==localStorage.getItem(a)?
+c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){c.setData(n);var k=mxUtils.bind(this,function(){c.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(c,d);null!=l&&l()}),e)});if(a!=c.getTitle()){var m=c.getHash();c.rename(a,mxUtils.bind(this,function(a){c.constructor!=LocalLibrary&&m!=c.getHash()&&
+(mxSettings.removeCustomLibrary(m),mxSettings.addCustomLibrary(c.getHash()));this.removeLibrarySidebar(m);k()}),e)}else k()}}catch(p){this.handleError(p)}};
+App.prototype.saveFile=function(a,d){var c=this.getCurrentFile();if(null!=c){var b=mxUtils.bind(this,function(){EditorUi.enableDrafts&&c.removeDraft();this.getCurrentFile()==c||c.isModified()||(c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(a||null==c.getTitle()||null==this.mode)if(null!=c&&c.constructor==LocalFile&&null!=c.fileHandle)this.chooseFileSystemEntries(mxUtils.bind(this,function(a,
+e){c.fileHandle=a;c.title=e.name;c.desc=e;this.save(e.name,b)}),null,this.createFileSystemOptions(c.getTitle()));else{var g=null!=c.getTitle()?c.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,l=this.mode,n=this.getServiceCount(!0);isLocalStorage&&n++;var e=4>=n?2:6<n?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(a,e,d){null!=a&&0<a.length&&(/(\.pdf)$/i.test(a)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();
+this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=a.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==l&&e==App.MODE_DEVICE?null!=c&&"chooseFileSystemEntries"in window?this.chooseFileSystemEntries(mxUtils.bind(this,function(a,e){c.fileHandle=a;c.mode=App.MODE_DEVICE;c.title=e.name;
+c.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,b)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&this.handleError(a)}),this.createFileSystemOptions(a)):(this.setMode(App.MODE_DEVICE),this.save(a,b)):"download"==e?(new LocalFile(this,null,a)).save():"_blank"==e?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):l!=e?this.pickFolder(e,mxUtils.bind(this,function(c){this.createFile(a,
+this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf(".")||/(\.drawio)$/i.test(a),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,e,b,null==this.mode,c)})):null!=e&&this.save(a,b)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,null,!0,e,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,n>e?390:270,!0,!0);g.init()}else this.save(c.getTitle(),b)}};
+App.prototype.loadTemplate=function(a,d,c,b,g){var f=!1,l=a;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(a)+"&base64=1&"+l,f=!0);var n=null!=b?b:a;this.editor.loadUrl(l,mxUtils.bind(this,function(b){try{var e=f?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b):b,l=/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n);if(l||this.isVisioData(e))l||(n=g?this.isRemoteVisioData(e)?"raw.vss":"raw.vssx":this.isRemoteVisioData(e)?
+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){d(a)},c,n);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,n))this.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&d(a.responseText)}),a);else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(a){d(a)}),
+mxUtils.bind(this,function(a){c(a)}));else{if(/(\.png)($|\?)/i.test(n)||this.isPngData(e))e=this.extractGraphModelFromPng(b);d(e)}}catch(p){c(p)}}),c,/(\.png)($|\?)/i.test(n)||/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n),null,null,f)};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_GITLAB?this.gitLab:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,d,c,b,g,f,l,n,e){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(a){k();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});try{if(b==App.MODE_GOOGLE&&null!=this.drive)null==l&&null!=this.stateArg&&null!=this.stateArg.folderId&&(l=this.stateArg.folderId),
+this.drive.insertFile(a,d,l,mxUtils.bind(this,function(a){k();this.fileCreated(a,c,f,g,e)}),m);else if(b==App.MODE_GITHUB&&null!=this.gitHub)this.gitHub.insertFile(a,d,mxUtils.bind(this,function(a){k();this.fileCreated(a,c,f,g,e)}),m,!1,l);else if(b==App.MODE_GITLAB&&null!=this.gitLab)this.gitLab.insertFile(a,d,mxUtils.bind(this,function(a){k();this.fileCreated(a,c,f,g,e)}),m,!1,l);else if(b==App.MODE_TRELLO&&null!=this.trello)this.trello.insertFile(a,d,mxUtils.bind(this,function(a){k();this.fileCreated(a,
+c,f,g,e)}),m,!1,l);else if(b==App.MODE_DROPBOX&&null!=this.dropbox)this.dropbox.insertFile(a,d,mxUtils.bind(this,function(a){k();this.fileCreated(a,c,f,g,e)}),m);else if(b==App.MODE_ONEDRIVE&&null!=this.oneDrive)this.oneDrive.insertFile(a,d,mxUtils.bind(this,function(a){k();this.fileCreated(a,c,f,g,e)}),m,!1,l);else if(b==App.MODE_BROWSER){k();var p=mxUtils.bind(this,function(){var b=new StorageFile(this,d,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,c,f,g,e)}),m)});null==localStorage.getItem(a)?
+p():this.confirm(mxResources.get("replaceIt",[a]),p,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}else!n&&b==App.MODE_DEVICE&&"chooseFileSystemEntries"in window?(k(),this.chooseFileSystemEntries(mxUtils.bind(this,function(a,b){var k=new LocalFile(this,d,b.name,null,a,b);k.saveFile(b.name,!1,mxUtils.bind(this,function(){this.fileCreated(k,c,f,g,e)}),m,!0)}),mxUtils.bind(this,function(a){"AbortError"!=a.name&&m(a)}),this.createFileSystemOptions(a))):
+(k(),this.fileCreated(new LocalFile(this,d,a,null==b),c,f,g,e))}catch(q){k(),this.handleError(q)}}};
+App.prototype.fileCreated=function(a,d,c,b,g){var f=window.location.pathname;null!=d&&0<d.length&&(f+="?libs="+d);null!=g&&0<g.length&&(f+="?clibs="+g);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var l=a.getData(),l=0<l.length?this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+f,e=l,k=null;null!=l&&/\.svg$/i.test(a.getTitle())&&
+(k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(k.container),e=this.decodeNodeIntoGraph(e,k));a.setData(this.createFileData(l,k,a,n));null!=k&&k.container.parentNode.removeChild(k.container);var m=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){m();var e=this.getCurrentFile();null==c&&null!=e&&(c=!e.isModified()&&null==e.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);c&&a.addAllSavedStatus();
+null!=d&&this.sidebar.showEntries(d);if(null!=g){for(var b=[],e=g.split(";"),f=0;f<e.length;f++)b.push(decodeURIComponent(e[f]));this.loadLibraries(b)}}),l=mxUtils.bind(this,function(){c||null==e||!e.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==c||c?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),
+null==a.getMode())),null!=b&&b(),window.openWindow(f,null,l))});a.constructor==LocalFile?p():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(a){m();this.handleError(a)}))}};
+App.prototype.loadFile=function(a,d,c,b,g){this.hideDialog();var f=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));
+StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=c)this.spinner.stop(),this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop();
try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var f=decodeURIComponent(a.substring(1));"<"!=f.charAt(0)&&(f=Graph.decompress(f));f=new LocalFile(this,f,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return a};this.fileLoaded(f);
-null!=b&&b()}else if("U"==a.charAt(0)){var k=decodeURIComponent(a.substring(1)),l=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+a,e,null,mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&this.editor.chromeless&&!this.editor.editable&&
-(c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(k,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=k,e=k.lastIndexOf("."),f=d.lastIndexOf("/");e>f&&0<f&&(d=d.substring(f+1,e),e=k.substring(e),this.useCanvasForExport||
-".png"!=e||(e=".drawio"),".svg"===e||".xml"===e||".html"===e||".png"===e||".drawio"===e)&&(c=d+e)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
+null!=b&&b()}else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1)),l=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 a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+a,d,null,mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&this.editor.chromeless&&!this.editor.editable&&
+(c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=g,d=g.lastIndexOf("."),f=e.lastIndexOf("/");d>f&&0<f&&(e=e.substring(f+1,d),d=g.substring(d),this.useCanvasForExport||
+".png"!=d||(d=".drawio"),".svg"===d||".xml"===d||".html"===d||".png"===d||".drawio"===d)&&(c=e+d)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(f=null,"G"==a.charAt(0)?f=this.drive:"D"==a.charAt(0)?f=this.dropbox:"W"==a.charAt(0)?f=this.oneDrive:"H"==a.charAt(0)?f=this.gitHub:"A"==a.charAt(0)?f=this.gitLab:"T"==a.charAt(0)&&(f=this.trello),null==f)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
-mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var t=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return t+a},window.location.hash="#"+d.getHash()):c==d&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
-this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+t+a)}))}}),l=this.getCurrentFile(),d=mxUtils.bind(this,
-function(){k||null==l||!l.isModified()?f():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=l&&(window.location.hash=l.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?d():null==l||e?d():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,d)).container,320,140,!0,!0)};
-App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+
-mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(a,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,k=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=k[c]&&this.loadLibrary(k[c]);null!=e&&e()}});if(null!=a)for(var l=0;l<a.length;l++){var d=encodeURIComponent(decodeURIComponent(a[l]));mxUtils.bind(this,function(a,d){if(null!=
-a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];k[d]=c;b--;f()}),g=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
-(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):g()}),g)}catch(y){g()}}),0);else if("U"==l){var m=decodeURIComponent(a.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(a){null!=a&&0<a.length?e(new UrlLibrary(this,a,m)):g()}),function(){g()},null,!0)}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,
-function(a){try{e(new RemoteLibrary(this,a,q))}catch(y){g()}}),function(){g()})}catch(x){g()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},g)}catch(x){g()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&
-(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){g()}}),function(a){g()}):g(!0)}}})(d,l)}f()}};
+mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var n=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(c){this.spinner.stop();this.fileLoaded(c);var e=this.getCurrentFile();null==e?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(e.getHash=function(){return n+a},window.location.hash="#"+e.getHash()):c==e&&null==c.getMode()&&(c=mxResources.get("copyCreated"),
+this.editor.setStatus('<div title="'+c+'" class="geStatusAlert" style="overflow:hidden;">'+c+"</div>"));null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+n+a)}))}}),l=this.getCurrentFile(),n=mxUtils.bind(this,
+function(){g||null==l||!l.isModified()?f():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=l&&(window.location.hash=l.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==a||0==a.length?n():null==l||d?n():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+a,null,n)).container,320,140,!0,!0)};
+App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor!=LocalLibrary&&(d+="\n"+a.getHash());a.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?d+=" ("+
+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
+App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=g[c]&&this.loadLibrary(g[c]);null!=d&&d()}});if(null!=a)for(var l=0;l<a.length;l++){var n=encodeURIComponent(decodeURIComponent(a[l]));mxUtils.bind(this,function(a,d){if(null!=
+a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];g[d]=c;b--;f()}),k=mxUtils.bind(this,function(e){c(a,e);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
+(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(x){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(a){null!=a&&0<a.length?e(new UrlLibrary(this,a,n)):k()}),function(){k()},null,!0)}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),!this.isOffline())try{var l=JSON.parse(l),t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,
+function(a){try{e(new RemoteLibrary(this,a,t))}catch(x){k()}}),function(){k()})}catch(y){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(y){k()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&
+(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(n,l)}f()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null==a?null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null):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")),a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop=
"-3px",this.shareButton.appendChild(a),"dark"!=uiTheme&&"atlas"!=uiTheme&&(this.shareButton.style.color="black",a.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))}};
-App.prototype.save=function(a,e){var c=this.getCurrentFile();if(null!=c&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(){c.handleFileSuccess(!0);null!=e&&e()}),k=mxUtils.bind(this,function(b){c.isModified()&&Editor.addRetryToError(b,mxUtils.bind(this,function(){this.save(a,e)}));c.handleFileError(b,!0)});try{a==c.getTitle()?c.save(!0,b,k):c.saveAs(a,b,k)}catch(f){k(f)}}};
-App.prototype.pickFolder=function(a,e,c,b,k){c=null!=c?c:!0;var f=this.spinner.pause();c&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){f();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);e(b)}}),k):c&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){f();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
-e(a))}),b):c&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){f();e(a)})):c&&a==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(a){f();e(a)})):c&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){f();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,e,c,b,k,f){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,f,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),c,b):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,f,b):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):k==App.MODE_BROWSER&&(c=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)?
-c():this.confirm(mxResources.get("replaceIt",[e]),c))};
-App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}var e=this.editor.graph,c=a.isEditable()&&!a.invalidChecksum;e.isEnabled()&&!c&&e.reset();e.setEnabled(c);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
+App.prototype.save=function(a,d){var c=this.getCurrentFile();if(null!=c&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(){c.handleFileSuccess(!0);null!=d&&d()}),g=mxUtils.bind(this,function(b){c.isModified()&&Editor.addRetryToError(b,mxUtils.bind(this,function(){this.save(a,d)}));c.handleFileError(b,!0)});try{a==c.getTitle()?c.save(!0,b,g):c.saveAs(a,b,g)}catch(f){g(f)}}};
+App.prototype.pickFolder=function(a,d,c,b,g){c=null!=c?c:!0;var f=this.spinner.pause();c&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){f();if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(b=a.docs[0].id);d(b)}}),g):c&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){f();null!=a&&null!=a.value&&0<a.value.length&&(a=OneDriveFile.prototype.getIdOf(a.value[0]),
+d(a))}),b):c&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):c&&a==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):c&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){f();d(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(a,d,c,b,g,f){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,a,f,mxUtils.bind(this,function(a){this.spinner.stop()}),
+mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),c,b):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,a,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,f,b):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,b?this.base64ToBlob(a,c):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,f):g==App.MODE_BROWSER&&(c=mxUtils.bind(this,function(){localStorage.setItem(d,a)}),null==localStorage.getItem(d)?
+c():this.confirm(mxResources.get("replaceIt",[d]),c))};
+App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var d=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}var d=this.editor.graph,c=a.isEditable()&&!a.invalidChecksum;d.isEnabled()&&!c&&d.reset();d.setEnabled(c);null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?
window.location.hash=a:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null!=this.format&&this.editor.graph.isSelectionEmpty()&&this.format.refresh()};
-App.prototype.showAuthDialog=function(a,e,c,b){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,e,c,b,k,f,l,d){var g=e;/\.svg$/i.test(g)||(g=g.substring(0,e.lastIndexOf("."))+b);var m=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(m=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var n=new XMLHttpRequest;n.open("GET",a,!0);m||(n.responseType="blob");if(d)for(var p in d)n.setRequestHeader(p,d[p]);n.onload=mxUtils.bind(this,function(){if(200<=
-n.status&&299>=n.status){var a=null;m?(a=JSON.parse(n.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([n.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){k(new LocalFile(this,a,g,!0))}),f,e)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});n.onerror=f;n.send()}else{var t=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(e)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&k(new LocalFile(this,
-c,g,!0))}else/\.png$/i.test(e)?(c=this.extractGraphModelFromPng(b),null!=c?k(new LocalFile(this,c,g,!0)):k(new LocalFile(this,b,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?k(new LocalFile(this,a.responseText,g,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,b,g,!0))}catch(v){null!=
-f&&f(v)}});c=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=c&&"image/"==c.substring(0,6);m?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=k){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?"data:image/png;base64,"+b:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));t(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
-f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},d):null!=l?l(a,t,f,c):this.editor.loadUrl(a,t,f,c,null,null,null,d)}};
+App.prototype.showAuthDialog=function(a,d,c,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(a,d,c,b,g,f,l,n){var e=d;/\.svg$/i.test(e)||(e=e.substring(0,d.lastIndexOf("."))+b);var k=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(k=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);k||(m.responseType="blob");if(n)for(var p in n)m.setRequestHeader(p,n[p]);m.onload=mxUtils.bind(this,function(){if(200<=
+m.status&&299>=m.status){var a=null;k?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,e,!0))}),f,d)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});m.onerror=f;m.send()}else{var q=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&g(new LocalFile(this,
+c,e,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,e,!0)):g(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,e,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,e,!0))}catch(v){null!=
+f&&f(v)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);k?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));q(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=
+f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},n):null!=l?l(a,q,f,c):this.editor.loadUrl(a,q,f,c,null,null,null,n)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="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";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -10612,8 +10614,8 @@ this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position
"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(a){a.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(a)}));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");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="atlas"!=uiTheme&&"1"!=urlParams.embed?"30px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition=
-"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));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=document.createElement("a");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="atlas"==uiTheme?"8px":"6px";this.fullscreenElement.style.right=
+"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var d=mxUtils.bind(this,
+function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",d);d();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="atlas"==uiTheme?"8px":"6px";this.fullscreenElement.style.right=
"atlas"!=uiTheme&&"1"!=urlParams.embed?"50px":"30px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);
mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var c=this.hsplitPosition;"dark"==uiTheme&&(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){var b=this.fullscreenMode;"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(b);
b||(c=this.hsplitPosition);this.hsplitPosition=b?c:0;this.toggleFormatPanel(b);this.fullscreenMode=!b;mxEvent.consume(a)}));"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",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=
@@ -10625,14 +10627,14 @@ this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidde
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=document.createElement("a"),this.userElement.className="geItem",this.userElement.style.position="absolute",this.userElement.style.fontSize=
"8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var c=document.createElement("div");c.className="geDialog";c.style.position="absolute";c.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";c.style.right="36px";c.style.padding="0px";c.style.cursor="default";this.userPanel=c}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var b=!1;this.userPanel.innerHTML="";c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.className="geDialogClose";c.style.top="8px";c.style.right="8px";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(c);if(null!=this.drive&&(c=this.drive.getUsersList(),0<c.length)){var e=mxUtils.bind(this,
+else{var b=!1;this.userPanel.innerHTML="";c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.className="geDialogClose";c.style.top="8px";c.style.right="8px";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(c);if(null!=this.drive&&(c=this.drive.getUsersList(),0<c.length)){var d=mxUtils.bind(this,
function(a,b){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile?(this.spinner.spin(document.body,b),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();a()}),2E3)):a()}),f=mxUtils.bind(this,function(a){var b=document.createElement("tr");b.style.cssText=a.isCurrent?"":"background-color: whitesmoke; cursor: pointer";b.setAttribute("title","User ID: "+a.id);b.innerHTML='<td valign="middle" style="height: 59px;width: 66px;'+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+
'"><img width="50" height="50" style="margin: 4px 8px 0 8px;border-radius:50%;" src="'+(null!=a.pictureUrl?a.pictureUrl:this.defaultUserPicture)+'"/></td><td valign="middle" style="white-space:nowrap;'+(null!=a.pictureUrl?"padding-top:4px;":"")+(a.isCurrent?"":"border-top: 1px solid rgb(224, 224, 224);")+'">'+mxUtils.htmlEntities(a.displayName)+'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+'</small><div style="margin-top:4px;"><i>'+mxResources.get("googleDrive")+"</i></div>";a.isCurrent||
-mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(a);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(b)}));return b}),b=!0,l=document.createElement("table");l.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
-for(var d=0;d<c.length;d++)l.appendChild(f(c[d]));this.userPanel.appendChild(l);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";f=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxResources.get("signOut"))}))}));f.className="geBtn";f.style["float"]="right";c.appendChild(f);f=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var a=this.drive.createAuthWin();a.blur();window.focus();e(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0,a)}),mxResources.get("closingFile")+"...")}));
-f.className="geBtn";f.style.margin="0px";c.appendChild(f);this.userPanel.appendChild(c)}c=mxUtils.bind(this,function(a,c,d,e){if(null!=a){b&&this.userPanel.appendChild(document.createElement("hr"));b=!0;var f=document.createElement("table");f.style.cssText="font-size:10pt;padding:"+(b?"10":"20")+"px 20px 10px 10px;";f.innerHTML+='<tr><td valign="top">'+(null!=c?'<img style="margin-right:6px;" src="'+c+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(a.displayName)+
-(null!=a.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+"</small>":"")+(null!=e?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(e)+"</i></div>":"")+"</td></tr>";this.userPanel.appendChild(f);a=document.createElement("div");a.style.textAlign="center";a.style.paddingBottom="12px";a.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",a.appendChild(d));this.userPanel.appendChild(a)}});null!=this.dropbox&&c(this.dropbox.getUser(),
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(a);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(b)}));return b}),b=!0,l=document.createElement("table");l.style.cssText="font-size:10pt;padding: 20px 0 0 0;min-width: 300px;border-spacing: 0;";
+for(var n=0;n<c.length;n++)l.appendChild(f(c[n]));this.userPanel.appendChild(l);c=document.createElement("div");c.style.textAlign="left";c.style.padding="8px";c.style.whiteSpace="nowrap";c.style.borderTop="1px solid rgb(224, 224, 224)";f=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+mxResources.get("signOut"))}))}));f.className="geBtn";f.style["float"]="right";c.appendChild(f);f=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var a=this.drive.createAuthWin();a.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(a){this.handleError(a)}),!0,a)}),mxResources.get("closingFile")+"...")}));
+f.className="geBtn";f.style.margin="0px";c.appendChild(f);this.userPanel.appendChild(c)}c=mxUtils.bind(this,function(a,c,d,f){if(null!=a){b&&this.userPanel.appendChild(document.createElement("hr"));b=!0;var e=document.createElement("table");e.style.cssText="font-size:10pt;padding:"+(b?"10":"20")+"px 20px 10px 10px;";e.innerHTML+='<tr><td valign="top">'+(null!=c?'<img style="margin-right:6px;" src="'+c+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;">'+mxUtils.htmlEntities(a.displayName)+
+(null!=a.email?'<br><small style="color:gray;">'+mxUtils.htmlEntities(a.email)+"</small>":"")+(null!=f?'<div style="margin-top:4px;"><i>'+mxUtils.htmlEntities(f)+"</i></div>":"")+"</td></tr>";this.userPanel.appendChild(e);a=document.createElement("div");a.style.textAlign="center";a.style.paddingBottom="12px";a.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",a.appendChild(d));this.userPanel.appendChild(a)}});null!=this.dropbox&&c(this.dropbox.getUser(),
IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&c(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=
this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&c(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=
mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&c(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitLabFile){var b=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
@@ -10644,331 +10646,331 @@ var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():n
App.prototype.getCurrentUser=function(){var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());return a};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var c=document.createElement("img");mxUtils.setOpacity(c,50);c.style.height="16px";c.style.width="16px";c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};
-var e=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b,c){this.ui=a;this.previousExtFonts=this.extFonts=b;this.prevCustomFonts=this.customFonts=c}e.apply(this,arguments);var b=this.editorUi,k=b.editor.graph,f=mxUtils.bind(k,k.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&
-"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),g=("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),m=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&
+var d=Menus.prototype.init;Menus.prototype.init=function(){function a(a,b,c){this.ui=a;this.previousExtFonts=this.extFonts=b;this.prevCustomFonts=this.customFonts=c}d.apply(this,arguments);var b=this.editorUi,g=b.editor.graph,f=mxUtils.bind(g,g.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&
+"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),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),k=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&
"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");b.actions.addAction("new...",function(){var a=b.isOffline(),c=new NewDialog(b,a,!(b.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));b.showDialog(c.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==b.getCurrentFile()&&b.showSplash()});c.init()});b.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",
-function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();k.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));k.scrollCellToVisible(k.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));b.showDialog(a.container,620,440,!0,!0)})).isEnabled=f;var n=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==
-mxConstants.POINTS});n=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.INCHES});n=b.actions.addAction("millimeters",function(){b.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.MILLIMETERS});this.put("units",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
-["points","millimeters"],b)})));n=b.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=b.ruler?(b.ruler.destroy(),b.ruler=null):b.ruler=new mxDualRuler(b,b.editor.graph.view.unit);b.refresh()});n.setEnabled(b.canvasSupported&&9!=document.documentMode);n.setToggleAction(!0);n.setSelectedCallback(function(){return null!=b.ruler});b.actions.addAction("properties...",function(){var a=new FilePropertiesDialog(b);b.showDialog(a.container,320,120,
-!0,!0);a.init()}).isEnabled=f;window.mxFreehand&&(b.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(a){k.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(b,document.body.offsetWidth-420,102,176,104)),k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing(),this.freehandWindow.window.setVisible(k.freehand.isDrawing()))})).isEnabled=function(){return f()&&mxClient.IS_SVG});b.actions.put("exportXml",new Action(mxResources.get("formatXml")+
-"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var c=null==b.pages||1>=b.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=b.addCheckbox(a,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),f=b.addCheckbox(a,mxResources.get("compressed"),!0),g=b.addCheckbox(a,mxResources.get("allPages"),!c,c);g.style.marginBottom="16px";
-mxEvent.addListener(e,"change",function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});a=new CustomDialog(b,a,mxUtils.bind(this,function(){b.downloadFile("xml",!f.checked,null,!e.checked,c||!g.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,180,!0,!0)}));b.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){b.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(a,c,d,e,f,g){a=new EmbedDialog(b,b.createLink(a,
-c,d,e,f,g,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("export"),null,a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=b.getBaseFilename(k),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
-mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+c+"\n</body>\n</html>";b.saveData(d+".html","html",e,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var e=function(){f!=this&&this.checked?(m.removeAttribute("disabled"),m.checked=!k.pageVisible):(m.setAttribute("disabled","disabled"),m.checked=!1)},d=180;if(b.pdfPageExport&&!a){var f=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),g=b.addRadiobox(c,"pages",mxResources.get("currentPage"),!1),l=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),
-!1,!0),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",e);mxEvent.addListener(g,"change",e);mxEvent.addListener(l,"change",e);d+=60}else l=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),!k.pageVisible||!b.pdfPageExport,!b.pdfPageExport),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1),b.pdfPageExport||mxEvent.addListener(l,"change",e);var p=null,v=null;mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-"draw.io"!=b.getServiceName()||(v=b.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),p=b.addCheckbox(c,mxResources.get("transparentBackground"),!1),d+=60);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!l.checked,a?!0:!f.checked,!m.checked,null!=p&&p.checked,null,null,n.checked,null!=v&&v.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,d,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,360,null!=
-b.pages&&1<b.pages.length&&(b.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){null!=c&&c.removeDraft();b.fileLoaded(null)}var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});b.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==
-k.getSelectionCount()){var a=k.getSelectionCell(),c=k.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var d=new RevisionDialog(b,a,c);b.showDialog(d.container,
-640,480,!0,!0);d.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");n=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(n.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=
-b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(n=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();k.model.execute(a)}),n.setToggleAction(!0),
-n.setSelectedCallback(function(){return b.isMathEnabled()}),n.isEnabled=f);isLocalStorage&&(n=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});
-b.actions.addAction("editGeometry...",function(){for(var a=k.getSelectionCells(),c=[],d=0;d<a.length;d++)k.getModel().isVertex(a[d])&&c.push(a[d]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;b.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){k.isEnabled()&&
-!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
-"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n,v)}),!0,null,"svg")}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);
-!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,p,null,v)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",
-mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",p,null,v)}),!0,!1,"jpeg"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));n=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));n.setToggleAction(!0);
-n.setSelectedCallback(function(){return k.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.alert(b.editor.appName+" "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("support...",function(){b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
+function(){var a=new NewDialog(b,null,!1,function(a){b.hideDialog();if(null!=a){var c=b.editor.graph.getFreeInsertPoint();g.setSelectionCells(b.importXml(a,Math.max(c.x,20),Math.max(c.y,20),!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));b.showDialog(a.container,620,440,!0,!0)})).isEnabled=f;var m=b.actions.addAction("points",function(){b.editor.graph.view.setUnit(mxConstants.POINTS)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.graph.view.unit==
+mxConstants.POINTS});m=b.actions.addAction("inches",function(){b.editor.graph.view.setUnit(mxConstants.INCHES)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.INCHES});m=b.actions.addAction("millimeters",function(){b.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.graph.view.unit==mxConstants.MILLIMETERS});this.put("units",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
+["points","millimeters"],b)})));m=b.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=b.ruler?(b.ruler.destroy(),b.ruler=null):b.ruler=new mxDualRuler(b,b.editor.graph.view.unit);b.refresh()});m.setEnabled(b.canvasSupported&&9!=document.documentMode);m.setToggleAction(!0);m.setSelectedCallback(function(){return null!=b.ruler});b.actions.addAction("properties...",function(){var a=new FilePropertiesDialog(b);b.showDialog(a.container,320,120,
+!0,!0);a.init()}).isEnabled=f;window.mxFreehand&&(b.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(a){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(b,document.body.offsetWidth-420,102,176,104)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=function(){return f()&&mxClient.IS_SVG});b.actions.put("exportXml",new Action(mxResources.get("formatXml")+
+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var c=null==b.pages||1>=b.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(e);var d=b.addCheckbox(a,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),f=b.addCheckbox(a,mxResources.get("compressed"),!0),k=b.addCheckbox(a,mxResources.get("allPages"),!c,c);k.style.marginBottom="16px";
+mxEvent.addListener(d,"change",function(){d.checked?k.setAttribute("disabled","disabled"):k.removeAttribute("disabled")});a=new CustomDialog(b,a,mxUtils.bind(this,function(){b.downloadFile("xml",!f.checked,null,!d.checked,c||!k.checked)}),null,mxResources.get("export"));b.showDialog(a.container,300,180,!0,!0)}));b.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){b.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(a,c,e,d,f,g){a=new EmbedDialog(b,b.createLink(a,
+c,e,d,f,g,null,!0));b.showDialog(a.container,440,240,!0,!0);a.init()})}));b.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("export"),null,a,function(a,c,e,d,f,g,k,l,m,n){b.createHtml(a,c,e,d,f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var e=b.getBaseFilename(k),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(e)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+c+"\n</body>\n</html>";b.saveData(e+".html","html",d,"text/html")}))})})}));b.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!b.isOffline()&&!b.printPdfExport){var a=null==b.pages||1>=b.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));e.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(e);var d=function(){f!=this&&this.checked?(m.removeAttribute("disabled"),m.checked=!g.pageVisible):(m.setAttribute("disabled","disabled"),m.checked=!1)},e=180;if(b.pdfPageExport&&!a){var f=b.addRadiobox(c,"pages",mxResources.get("allPages"),!0),k=b.addRadiobox(c,"pages",mxResources.get("currentPage"),!1),l=b.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),
+!1,!0),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1);mxEvent.addListener(f,"change",d);mxEvent.addListener(k,"change",d);mxEvent.addListener(l,"change",d);e+=60}else l=b.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),m=b.addCheckbox(c,mxResources.get("crop"),!g.pageVisible||!b.pdfPageExport,!b.pdfPageExport),n=b.addCheckbox(c,mxResources.get("grid"),!1,!1),b.pdfPageExport||mxEvent.addListener(l,"change",d);var p=null,v=null;mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+"draw.io"!=b.getServiceName()||(v=b.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),p=b.addCheckbox(c,mxResources.get("transparentBackground"),!1),e+=60);c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("pdf",null,null,!l.checked,a?!0:!f.checked,!m.checked,null!=p&&p.checked,null,null,n.checked,null!=v&&v.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,e,!0,!0)}else b.showDialog((new PrintDialog(b,mxResources.get("formatPdf"))).container,360,null!=
+b.pages&&1<b.pages.length&&(b.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){function a(){null!=c&&c.removeDraft();b.fileLoaded(null)}var c=b.getCurrentFile();null!=c&&c.isModified()?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});b.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==
+g.getSelectionCount()){var a=g.getSelectionCell(),c=g.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...",function(){b.isRevisionHistorySupported()?b.spinner.spin(document.body,mxResources.get("loading"))&&b.getRevisions(mxUtils.bind(this,function(a,c){b.spinner.stop();var e=new RevisionDialog(b,a,c);b.showDialog(e.container,
+640,480,!0,!0);e.init()}),mxUtils.bind(this,function(a){b.handleError(a)})):b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});b.actions.addAction("createRevision",function(){b.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");m=b.actions.addAction("synchronize",function(){b.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(m.label=mxResources.get("refresh"));b.actions.addAction("upload...",function(){var a=
+b.getCurrentFile();null!=a&&(window.drawdata=b.getFileData(),a=null!=a.getTitle()?a.getTitle():b.defaultFilename,b.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(b.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a),null,!0))});"undefined"!==typeof MathJax&&(m=b.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!b.isMathEnabled();g.model.execute(a)}),m.setToggleAction(!0),
+m.setSelectedCallback(function(){return b.isMathEnabled()}),m.isEnabled=f);isLocalStorage&&(m=b.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),m.setToggleAction(!0),m.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=b.actions.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&b.editor.autosave});
+b.actions.addAction("editGeometry...",function(){for(var a=g.getSelectionCells(),c=[],e=0;e<a.length;e++)g.getModel().isVertex(a[e])&&c.push(a[e]);0<c.length&&(a=new EditGeometryDialog(b,c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;b.actions.addAction("copyStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&(q=g.copyStyle(g.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){g.isEnabled()&&
+!g.isSelectionEmpty()&&null!=q&&g.pasteStyle(q,g.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container,320,170,!0,!0);a.init()}}));b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
+"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,e,d,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,e,d,f,g,k,!l,m,n,v)}),!0,null,"svg")}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",mxUtils.bind(this,function(a,c,e,d,f,g,k,l,m,n,p,v){a=parseInt(a);
+!isNaN(a)&&0<a&&b.exportImage(a/100,c,e,d,f,k,!l,m,null,p,null,v)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,e,d,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,e,d,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://desk.draw.io/support/solutions/articles/16000067785",
+mxUtils.bind(this,function(a,c,e,d,f,g,k,l,m,n,p,v){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,e,d,!1,k,!l,!1,"jpeg",p,null,v)}),!0,!1,"jpeg"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,e,d,f){b.downloadFile("jpeg",null,null,a,null,null,null,d,f)}),!0,!0)}));m=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));m.setToggleAction(!0);
+m.setSelectedCallback(function(){return g.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.alert(b.editor.appName+" "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("support...",function(){b.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):b.openLink("shortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
-b.actions.addAction("forkme",function(){b.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";b.actions.addAction("downloadDesktop...",function(){b.openLink("https://get.draw.io/")});n=b.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(b,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
-function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));n=b.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(b,document.body.offsetWidth-300,110,240,155),
-this.findWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",
+b.actions.addAction("forkme",function(){b.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";b.actions.addAction("downloadDesktop...",function(){b.openLink("https://get.diagrams.net/")});m=b.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(b,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
+function(){b.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));m=b.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(b,document.body.offsetWidth-300,110,240,155),
+this.findWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",
new Action(mxResources.get("formatVsdx")+" (beta)...",function(){b.exportVisio()}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(".configuration"),a=new TextareaDialog(b,mxResources.get("configuration")+":",null!=a?JSON.stringify(JSON.parse(a),null,2):"",function(a){if(null!=a)try{if(0<a.length){var c=JSON.parse(a);localStorage.setItem(".configuration",JSON.stringify(c))}else localStorage.removeItem(".configuration");
b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}},null,null,null,null,null,!0,null,null,"https://desk.draw.io/support/solutions/articles/16000058316",EditorUi.isElectronApp?null:[[mxResources.get("reset"),function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(".configuration"),localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode"),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}],
-[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b,e);b.showDialog(f.container,440,240,!0);f.init()}catch(H){b.handleError(H)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||
-isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));
-return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==
-uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage="url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);
+[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var e=JSON.parse(c.value),d=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),f=new EmbedDialog(b,d);b.showDialog(f.container,440,240,!0);f.init()}catch(H){b.handleError(H)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||
+isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var e=mxUtils.bind(this,function(e){var d=""==e?mxResources.get("automatic"):mxLanguageMap[e],f=null;""!=d&&(f=a.addItem(d,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(e==mxLanguage||""==e&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));
+return f});e("");a.addSeparator(c);for(var d in mxLanguageMap)e(d)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!=c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==
+uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex="1";c.appendChild(e);
mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);
-b.executeLayoutList(c);b.customLayoutConfig=c}catch(D){b.handleError(D),null!=window.console&&console.error(D)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var n=this.get("layout"),q=n.funct;n.funct=function(a,c){q.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
-null!=a&&e){var f=b.editor.graph,g=new mxOrgChartLayout(f,a,c,d),k=f.getDefaultParent();1<f.model.getChildCount(f.getSelectionCell())&&(k=f.getSelectionCell());g.execute(k);e=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("orgChartType")+": ");g.appendChild(k);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var k=[mxResources.get("linear"),
+b.executeLayoutList(c);b.customLayoutConfig=c}catch(D){b.handleError(D),null!=window.console&&console.error(D)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()});var m=this.get("layout"),t=m.funct;m.funct=function(a,c){t.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,e=20,d=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
+null!=a&&d){var f=b.editor.graph,g=new mxOrgChartLayout(f,a,c,e),k=f.getDefaultParent();1<f.model.getChildCount(f.getSelectionCell())&&(k=f.getSelectionCell());g.execute(k);d=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("orgChartType")+": ");g.appendChild(k);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var k=[mxResources.get("linear"),
mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],m=0;m<k.length;m++){var n=document.createElement("option");mxUtils.write(n,k[m]);n.value=m;2==m&&n.setAttribute("selected","selected");l.appendChild(n)}mxEvent.addListener(l,"change",function(){a=l.value});g.appendChild(l);k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";
-k.style.width="140px";mxUtils.write(k,mxResources.get("parentChildSpacing")+": ");g.appendChild(k);var p=document.createElement("input");p.type="number";p.value=c;p.style.width="200px";p.style.boxSizing="border-box";g.appendChild(p);mxEvent.addListener(p,"change",function(){c=p.value});k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var z=document.createElement("input");
-z.type="number";z.value=d;z.style.width="200px";z.style.boxSizing="border-box";g.appendChild(z);mxEvent.addListener(z,"change",function(){d=z.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(g.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);
-b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",
-mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=
-e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),
-mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var a=k.cloneCells(k.getSelectionCells()),c=k.getBoundingBoxFromGeometry(a),
-a=k.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(a)))+"'),")}})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=k.getGraphBounds(),b=k.view.translate,c=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,
-function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;
-var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&
-(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(I){mxLog.debug("Error: ",I.message)}else mxLog.debug("No pages found for checksum");var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(I){b.handleError(I),null!=window.console&&console.error(I)}});a.textarea.style.width=
+k.style.width="140px";mxUtils.write(k,mxResources.get("parentChildSpacing")+": ");g.appendChild(k);var p=document.createElement("input");p.type="number";p.value=c;p.style.width="200px";p.style.boxSizing="border-box";g.appendChild(p);mxEvent.addListener(p,"change",function(){c=p.value});k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var v=document.createElement("input");
+v.type="number";v.value=e;v.style.width="200px";v.style.boxSizing="border-box";g.appendChild(v);mxEvent.addListener(v,"change",function(){e=v.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body,mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(g.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);
+b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var e=a.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","25");d.style.marginLeft="8px";mxEvent.addListener(d,"keydown",
+mxUtils.bind(this,function(a){var b=mxUtils.trim(d.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),d.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(d.value="")}));e.firstChild.nextSibling.appendChild(d);mxEvent.addGestureListeners(d,function(a){document.activeElement!=
+d&&d.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){d.focus()},0);this.addMenuItems(a,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),
+mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"),mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!g.isSelectionEmpty()){var a=g.cloneCells(g.getSelectionCells()),c=g.getBoundingBoxFromGeometry(a),
+a=g.moveCells(a,-c.x,-c.y);b.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+c.width+", "+c.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(a)))+"'),")}})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,
+function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=d[a]){for(;0<d[a].length;){var e=d[a].pop();b(e)}delete d[a]}}else mxLog.debug(c+": Visited: "+a)}var c=a.parentNode.id,e=a.childNodes;a={};for(var d={},f=null,g={},k=0;k<e.length;k++){var l=e[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;
+var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==d[m]&&(d[m]=[]),d[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(e=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(c+": Checked");var n={};null==f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",d)))};"<"!=a.charAt(0)&&
+(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var e=mxUtils.parseXml(a),d=b.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=d&&0<d.length)try{var f=b.getHashValueForPages(d);mxLog.debug("Checksum: ",f)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var g=e.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(J){b.handleError(J),null!=window.console&&console.error(J)}});a.textarea.style.width=
"600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)),null,2))}catch(C){b.handleError(C),null!=window.console&&console.error(C)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,
-620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,k.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=k.getGraphBounds(),c=k.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e);d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,g=d.save;d.save=function(){f++;g.apply(this,arguments)};
-var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(k.getView().getState(k.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,
+620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,g.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,e=mxUtils.createXmlDocument(),d=e.createElement("output");e.appendChild(d);e=new mxXmlCanvas2D(d);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var f=0,k=e.save;e.save=function(){f++;k.apply(this,arguments)};
+var l=e.restore;e.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(d));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...",mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,
function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsAllDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);a.setRequestHeader("authorization","Bearer "+b.drive.token)};c.send(function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.saveLocalFile(c.getText(),"json-"+
a+".txt","text/plain"):b.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),b.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),
-c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),a.files[0].name,!0)}catch(F){b.handleError(F,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);
-this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){k.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),
-a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,
-f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");
-e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];
-e.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else b.handleError({message:mxResources.get("errorUpdatingPreview")})});b.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));b.actions.put("liveImage",new Action("Live image...",function(){var a=b.getCurrentFile();null!=a&&b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(c){b.spinner.stop();null!=c?(c=new EmbedDialog(b,'<img src="'+(a.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+
-a.getId())+'"/>'),b.showDialog(c.container,440,240,!0,!0),c.init()):b.handleError({message:mxResources.get("invalidPublicUrl")})})}));b.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedImage(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("image"),
-mxResources.get("retina"),b.isExportToCanvas())}));b.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showEmbedImageDialog(function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedSvg(a,c,d,e,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));
-b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=k.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((a.y+a.height-k.view.translate.y)/k.view.scale)+2,function(a,c,d,e,f,g,k,l){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(m){b.spinner.stop();m=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+b.createLink(a,c,d,e,f,g,m)+'"></iframe>');
-b.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));b.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){b.showPublishLinkDialog(null,null,null,null,function(a,c,d,e,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(k){b.spinner.stop();k=new EmbedDialog(b,b.createLink(a,c,d,e,f,g,k));b.showDialog(k.container,440,240,!0,!0);k.init()})})}));b.actions.addAction("microsoftOffice...",function(){b.openLink("https://office.draw.io")});
+c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)),a.files[0].name,!0)}catch(E){b.handleError(E,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);
+this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),
+a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,e,d,f,g,k,l,m,n){b.createHtml(a,c,e,d,
+f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var e=new EmbedDialog(b,a+"\n"+c,null,null,function(){var e=window.open(),d=e.document;if(null!=d){"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(a);var f=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;f&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");
+d.close();if(!f){var g=e.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=e.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);e.document.body.insertBefore(g,e.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];
+d.body.appendChild(a);g.parentNode.removeChild(g)},20)}}else b.handleError({message:mxResources.get("errorUpdatingPreview")})});b.showDialog(e.container,440,240,!0,!0);e.init()}))})})}));b.actions.put("liveImage",new Action("Live image...",function(){var a=b.getCurrentFile();null!=a&&b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(c){b.spinner.stop();null!=c?(c=new EmbedDialog(b,'<img src="'+(a.constructor!=DriveFile?c:"https://drive.google.com/uc?id="+
+a.getId())+'"/>'),b.showDialog(c.container,440,240,!0,!0),c.init()):b.handleError({message:mxResources.get("invalidPublicUrl")})})}));b.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){b.showEmbedImageDialog(function(a,c,e,d,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedImage(a,c,e,d,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("image"),
+mxResources.get("retina"),b.isExportToCanvas())}));b.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showEmbedImageDialog(function(a,c,e,d,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.createEmbedSvg(a,c,e,d,f,g,function(a){b.spinner.stop();a=new EmbedDialog(b,a);b.showDialog(a.container,440,240,!0,!0);a.init()},function(a){b.spinner.stop();b.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));
+b.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=g.getGraphBounds();b.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((a.y+a.height-g.view.translate.y)/g.view.scale)+2,function(a,c,e,d,f,g,k,l){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(m){b.spinner.stop();m=new EmbedDialog(b,'<iframe frameborder="0" style="width:'+k+";height:"+l+';" src="'+b.createLink(a,c,e,d,f,g,m)+'"></iframe>');
+b.showDialog(m.container,440,240,!0,!0);m.init()})},!0)}));b.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){b.showPublishLinkDialog(null,null,null,null,function(a,c,e,d,f,g){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(k){b.spinner.stop();k=new EmbedDialog(b,b.createLink(a,c,e,d,f,g,k));b.showDialog(k.container,440,240,!0,!0);k.init()})})}));b.actions.addAction("microsoftOffice...",function(){b.openLink("https://office.draw.io")});
b.actions.addAction("googleDocs...",function(){b.openLink("http://docsaddon.draw.io")});b.actions.addAction("googleSlides...",function(){b.openLink("https://slidesaddon.draw.io")});b.actions.addAction("googleSheets...",function(){b.openLink("https://sheetsaddon.draw.io")});b.actions.addAction("googleSites...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();a=new GoogleSitesDialog(b,a);b.showDialog(a.container,420,
-256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)n=b.actions.addAction("scratchpad",function(){b.toggleScratchpad()}),n.setToggleAction(!0),n.setSelectedCallback(function(){return null!=b.scratchpad}),b.actions.addAction("plugins...",function(){b.showDialog((new PluginsDialog(b)).container,360,170,!0,!1)});n=b.actions.addAction("search",function(){var a=b.sidebar.isEntryVisible("search");b.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});
-n.setToggleAction(!0);n.setSelectedCallback(function(){return b.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){k.isEditing()&&k.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var d=b.createLoadMessage("save");d.xml=c;a&&(d.exit=!0);c=JSON.stringify(d)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&
+256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)m=b.actions.addAction("scratchpad",function(){b.toggleScratchpad()}),m.setToggleAction(!0),m.setSelectedCallback(function(){return null!=b.scratchpad}),b.actions.addAction("plugins...",function(){b.showDialog((new PluginsDialog(b)).container,360,170,!0,!1)});m=b.actions.addAction("search",function(){var a=b.sidebar.isEntryVisible("search");b.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});
+m.setToggleAction(!0);m.setSelectedCallback(function(){return b.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(b.actions.get("save").funct=function(a){g.isEditing()&&g.stopEditing();var c="0"!=urlParams.pages||null!=b.pages&&1<b.pages.length?b.getFileData(!0):mxUtils.getXml(b.editor.getGraphXml());if("json"==urlParams.proto){var e=b.createLoadMessage("save");e.xml=c;a&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&
(b.editor.modified=!1,b.editor.setStatus(""));a=b.getCurrentFile();null==a||a.constructor==LocalFile&&null==a.mode||b.saveFile()},b.actions.addAction("saveAndExit",function(){b.actions.get("save").funct(!0)}),b.actions.addAction("exit",function(){var a=function(){b.editor.modified=!1;var a="json"==urlParams.proto?JSON.stringify({event:"exit",modified:b.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};b.editor.modified?b.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),
mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){b.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],c),b.jpgSupported&&this.addMenuItems(a,["exportJpg"],c)):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPng","exportJpg"],c);this.addMenuItems(a,["exportSvg","-"],c);b.isOffline()||b.printPdfExport?this.addMenuItems(a,["exportPdf"],c):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,
-["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&b.isOffline()||this.addMenuItems(a,["exportVsdx"],c);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function e(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,function(a){var c=
-"data:image/"==a.getData().substring(0,11)?n(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(Editor.createSvgDataUri(a.getData())),c="image/svg+xml");f(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==b.drive)},!0)}var f=mxUtils.bind(this,function(a,c,d){var e=k.view,f=k.getGraphBounds(),g=k.snap(Math.ceil(Math.max(0,f.x/e.scale-e.translate.x)+4*k.gridSize)),l=k.snap(Math.ceil(Math.max(0,
-(f.y+f.height)/e.scale-e.translate.y)+4*k.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(e){var f=!0,m=mxUtils.bind(this,function(){b.resizeImage(e,a,mxUtils.bind(this,function(e,m,n){e=f?Math.min(1,Math.min(b.maxImageSize/m,b.maxImageSize/n)):1;b.importFile(a,c,g,l,Math.round(m*e),Math.round(n*e),d,function(a){b.spinner.stop();k.setSelectionCells(a);k.scrollCellToVisible(k.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=
-a;m()}):m()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,g,l,0,0,d,function(a){b.spinner.stop();k.setSelectionCells(a);k.scrollCellToVisible(k.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)?b="image/gif":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){e(b.drive)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){e(b.oneDrive)},c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?
-a.addItem(mxResources.get("dropbox")+"...",null,function(){e(b.dropbox)},c):d&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){e(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){e(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){e(b.trello)},
-c):m&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),
-function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){f(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var d=mxSettings.getUi(),
-e=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=d&&"atlas"!=d&&"dark"!=d&&"min"!=d&&a.addCheckmark(e,Editor.checkmarkImage);a.addSeparator(c);e=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("minimal"),
-null,function(){mxSettings.setUi("min");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==d&&a.addCheckmark(e,Editor.checkmarkImage);e=a.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},
-c);"dark"==d&&a.addCheckmark(e,Editor.checkmarkImage)})));n=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a){var c=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&null!=a&&b!=a.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&a.rename(b,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),
-mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));n.isEnabled=function(){return this.enabled&&
-f.apply(this,arguments)};n.visible="1"!=urlParams.embed;b.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,function(){b.spinner.stop();
-a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,
-function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,
-function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&a.share()}catch(B){b.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,
-function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&
-!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},x=function(a,c,d,e){var f=new mxCell(a,new mxGeometry(0,0,c,d),e);f.vertex=!0;a=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([f],!0));f.geometry.x=a.x;f.geometry.y=
-a.y;k.getModel().beginUpdate();try{f=k.addCell(f),k.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(f);k.setSelectionCell(f);k.container.focus();k.editAfterInsert&&k.startEditing(f);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(k.view.getState(f))},0);return f};b.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(x("Text",
-40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&x("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
-x("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&x("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,
-"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));
-this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){y(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},
-c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},
-c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):d&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},
-c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):m&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},
+["exportPdf"],c);mxClient.IS_IE||"undefined"===typeof VsdxExport&&b.isOffline()||this.addMenuItems(a,["exportVsdx"],c);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(a,c){function d(a){a.pickFile(function(c){b.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(c,function(a){var c=
+"data:image/"==a.getData().substring(0,11)?m(a.getTitle()):"text/xml";/\.svg$/i.test(a.getTitle())&&!b.editor.isDataSvg(a.getData())&&(a.setData(Editor.createSvgDataUri(a.getData())),c="image/svg+xml");f(a.getData(),c,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==b.drive)},!0)}var f=mxUtils.bind(this,function(a,c,e){var d=g.view,f=g.getGraphBounds(),k=g.snap(Math.ceil(Math.max(0,f.x/d.scale-d.translate.x)+4*g.gridSize)),l=g.snap(Math.ceil(Math.max(0,
+(f.y+f.height)/d.scale-d.translate.y)+4*g.gridSize));"data:image/"==a.substring(0,11)?b.loadImage(a,mxUtils.bind(this,function(d){var f=!0,m=mxUtils.bind(this,function(){b.resizeImage(d,a,mxUtils.bind(this,function(d,m,n){d=f?Math.min(1,Math.min(b.maxImageSize/m,b.maxImageSize/n)):1;b.importFile(a,c,k,l,Math.round(m*d),Math.round(n*d),e,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),f)});a.length>b.resampleThreshold?b.confirmImageResize(function(a){f=
+a;m()}):m()}),mxUtils.bind(this,function(){b.handleError({message:mxResources.get("cannotOpenFile")})})):b.importFile(a,c,k,l,0,0,e,function(a){b.spinner.stop();g.setSelectionCells(a);g.scrollCellToVisible(g.getSelectionCell())})}),m=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)?b="image/gif":/\.pdf$/i.test(a)&&(b="application/pdf");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
+b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){d(b.drive)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){d(b.oneDrive)},c):e&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?
+a.addItem(mxResources.get("dropbox")+"...",null,function(){d(b.dropbox)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){d(b.gitHub)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){d(b.gitLab)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){d(b.trello)},
+c):k&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.importLocalFile(!1)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.importLocalFile(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),
+function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";b.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(b){f(b,c,a)},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c))}))).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(a,c){var e=mxSettings.getUi(),
+d=a.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"!=e&&"atlas"!=e&&"dark"!=e&&"min"!=e&&a.addCheckmark(d,Editor.checkmarkImage);a.addSeparator(c);d=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("kennedy");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"kennedy"==e&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("minimal"),
+null,function(){mxSettings.setUi("min");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"min"==e&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==e&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");mxSettings.save();b.alert(mxResources.get("restartForChangeRequired"))},
+c);"dark"==e&&a.addCheckmark(d,Editor.checkmarkImage)})));m=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a){var c=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&null!=a&&b!=a.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&a.rename(b,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),
+mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;b.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,b.editor.fileExtensions);this.editorUi.showDialog(c.container,340,90,!0,!0);c.init()}}));m.isEnabled=function(){return this.enabled&&
+f.apply(this,arguments)};m.visible="1"!=urlParams.embed;b.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=b.getCurrentFile();if(null!=a){var c=b.getCopyFilename(a);a.constructor==DriveFile?(c=new CreateDialog(b,c,mxUtils.bind(this,function(c,e){"download"==e&&(e=App.MODE_GOOGLE);null!=c&&0<c.length&&(e==App.MODE_GOOGLE?b.spinner.spin(document.body,mxResources.get("saving"))&&a.saveAs(c,mxUtils.bind(this,function(c){a.desc=c;a.save(!1,mxUtils.bind(this,function(){b.spinner.stop();
+a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,e))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this,
+function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var e=0;e<a.desc.parents.length;e++)if(a.desc.parents[e].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,
+function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&a.share()}catch(z){b.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,
+function(a,c){var e=b.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a,c,e,d){("plantUml"!=d||EditorUi.enablePlantUml&&
+!b.isOffline())&&a.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==d||"formatSql"==d||"plantUml"==d||"mermaid"==d){var a=new ParseDialog(b,e,d);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,e,d),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},y=function(a,c,e,d){var f=new mxCell(a,new mxGeometry(0,0,c,e),d);f.vertex=!0;a=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([f],!0));f.geometry.x=a.x;f.geometry.y=
+a.y;g.getModel().beginUpdate();try{f=g.addCell(f),g.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(f);g.setSelectionCell(f);g.container.focus();g.editAfterInsert&&g.startEditing(f);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(g.view.getState(f))},0);return f};b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(y("Text",
+40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var x=mxUtils.bind(this,function(a,b,c){for(var e=0;e<c.length;e++)"-"==c[e]?a.addSeparator(b):v(a,b,mxResources.get(c[e])+"...",c[e])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,
+"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));
+this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){x(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,c){var e=b.getRecent();if(null!=e){for(var d=0;d<e.length;d++)(function(e){var d=e.mode;d==App.MODE_GOOGLE?d="googleDrive":d==App.MODE_ONEDRIVE&&(d="oneDrive");a.addItem(e.title+" ("+mxResources.get(d)+")",null,function(){b.loadFile(e.id)},
+c)})(e[d]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},
+c):e&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},
+c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):k&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickFile(App.MODE_BROWSER)},
c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickFile(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){null!=a&&0<a.length&&(null==b.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));
b.showDialog(a.container,300,80,!0,!0);a.init()},c))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?
-a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):d&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):m&&"function"===typeof window.TrelloClient&&
+a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):e&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):k&&"function"===typeof window.TrelloClient&&
a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)})),this.put("openLibraryFrom",new Menu(function(a,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):g&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
-null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):d&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},
-c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):m&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},
+(null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):l&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):e&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):n&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},
+c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickLibrary(App.MODE_TRELLO)},c):k&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},
c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(H){b.handleError(H,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),
b.handleError(null,mxResources.get("errorLoadingFile"))},function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["undo","redo","-","cut",
-"copy"]);EditorUi.isElectronApp&&this.addMenuItems(a,["copyAsImage"]);this.addMenuItems(a,"paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));n=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),
-this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&
-this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var n=this.get("viewPanels"),A=n.funct;n.funct=function(a,c){A.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?
-["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||
-9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,
+"copy"]);EditorUi.isElectronApp&&this.addMenuItems(a,["copyAsImage"]);this.addMenuItems(a,"paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));m=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),
+this.commentsWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&
+this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var m=this.get("viewPanels"),A=m.funct;m.funct=function(a,c){A.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?
+["comments","-"]:["-"]));this.addMenuItems(a,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var e=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||
+9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==typeof MathJax){var e=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,
["copyConnect","collapseExpand","-"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(a,["showStartScreen"],c);"1"!=urlParams.embed&&this.addMenuItems(a,["autosave"],c);a.addSeparator(c);!b.isOfflineApp()&&isLocalStorage&&this.addMenuItem(a,"plugins",c);this.addMenuItems(a,["tags","-","editDiagram","-","configuration"],c);a.addSeparator(c);"1"==urlParams.newTempDlg&&(b.actions.addAction("templates",function(){var a=new TemplatesDialog;b.showDialog(a.container,a.width,
a.height,!0,!1,null,!1,!0);a.init(b,function(a){console.log(a)},null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"},{url:"123",title:"Test 4"},{url:"123",title:"Test 5"},{url:"123",
title:"Test 6"}]):a([{url:"123",title:"Test 4",imgUrl:"https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg"},{url:"123",title:"Test 5"},{url:"123",title:"Test 6"},{url:"123",title:"Test 1Test 1Test 1Test 1Test 1Test 1Test 11Test 1Test 11Test 1Test 1dgdsgdfg fdg dfgdfg dfg dfg"},{url:"123",title:"Test 2",imgUrl:"https://www.google.com.eg/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},{url:"123",title:"Test 3",changedBy:"Ashraf Teleb",lastModifiedOn:"Yesterday"}]);console.log(b)},
1E3)},function(a,b,c){setTimeout(function(){b(c?[{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"},{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"}]:[{url:"123",title:a+"Test 5"},{url:"123",title:a+"Test 6"},{url:"123",title:a+"Test 1Test 1Test 1Test 1Test 1Test 1Test 1"},{url:"123",title:a+"Test 2"},{url:"123",title:a+"Test 3"},{url:"123",title:a+"Test 4"}])},2E3)},null)}),this.addMenuItem(a,
"templates",c))})));this.put("file",new Menu(mxUtils.bind(this,function(a,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",a,c),this.addSubmenu("exportAs",a,c),this.addSubmenu("embed",a,c),"1"==urlParams.libraries&&(this.addMenuItems(a,["-"],c),this.addSubmenu("newLibrary",a,c),this.addSubmenu("openLibraryFrom",a,c)),b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c),this.addMenuItems(a,["-","pageSetup","print","-","rename"],c),"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&
-this.addMenuItems(a,["saveAndExit"],c):(this.addMenuItems(a,["save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],c)),"1"!=urlParams.noExitBtn&&this.addMenuItems(a,["exit"],c);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],c);this.addMenuItems(a,["save","-","share"],c);var e=this.addMenuItem(a,"synchronize",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,
-"https://desk.draw.io/support/solutions/articles/16000087947");a.addSeparator(c)}else this.addMenuItems(a,["new"],c);this.addSubmenu("openFrom",a,c);isLocalStorage&&this.addSubmenu("openRecent",a,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile&&null==d.fileHandle||(a.addSeparator(c),e=this.addMenuItem(a,"synchronize",c),(!b.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(a,["-","save","saveAs","-"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=b.getServiceName()||b.isOfflineApp()||null==d||this.addMenuItems(a,["share","-"],c),this.addMenuItems(a,["rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):(this.addMenuItems(a,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&
-this.addMenuItems(a,["moveToFolder"],c)));a.addSeparator(c);this.addSubmenu("importFrom",a,c);this.addSubmenu("exportAs",a,c);a.addSeparator(c);this.addSubmenu("embed",a,c);this.addSubmenu("publish",a,c);a.addSeparator(c);this.addSubmenu("newLibrary",a,c);this.addSubmenu("openLibraryFrom",a,c);b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,
-["-","properties"]));this.addMenuItems(a,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],c);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+
-b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=[];for(c=0;null!=this.previousExtFonts&&c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,c){for(var d=mxUtils.bind(this,function(d,e,f){var g=this.editorUi.editor.graph,k=this.styleChange(b,d,[mxConstants.STYLE_FONTFAMILY],[d],null,c,function(){document.execCommand("fontname",!1,
-d);g.addExtFont(d,e)},function(){g.updateLabelElements(g.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&g.replaceElement(a,"div")});g.addExtFont(d,e)});f&&(f=document.createElement("span"),f.className="geSprite geSprite-delete",f.style.cursor="pointer",f.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(f),mxEvent.addListener(f,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(b){var c=mxUtils.clone(this.editorUi.editor.graph.extFonts);
-if(null!=c&&0<c.length)for(var e=0;e<c.length;e++)if(c[e].name==d){c.splice(e,1);break}for(var f=mxUtils.clone(this.customFonts),e=0;e<f.length;e++)if(f[e].name==d){f.splice(e,1);break}c=new a(this.editorUi,c,f);this.editorUi.editor.graph.model.execute(c);this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));k.firstChild.nextSibling.style.fontFamily=d}),e=0;e<this.defaultFonts.length;e++)d(this.defaultFonts[e]);b.addSeparator(c);var f=this.editorUi.editor.graph.extFonts;if(null!=f&&0<f.length){for(var g=
-{},k=!1,e=0;e<this.customFonts.length;e++)g[this.customFonts[e].name]=!0;for(e=0;e<f.length;e++)g[f[e].name]||(this.customFonts.push(f[e]),k=!0);k&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(e=0;e<this.customFonts.length;e++)f=this.customFonts[e].name,g=this.customFonts[e].url,d(f,g,!0),this.editorUi.editor.graph.addExtFont(f,g,!0);b.addSeparator(c);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=
-new a(this.editorUi,[],[]);this.editorUi.editor.graph.model.execute(b)}),c);b.addSeparator(c)}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=mxConstants.DEFAULT_FONTFAMILY,c="s",d=null,e=a.getView().getState(a.getSelectionCell());null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,c=e.style.FType||c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNofFound",
-null,"URL not found"),0==d.indexOf(PROXY_URL)&&(d=decodeURIComponent(d.substr((PROXY_URL+"?url=").length)))));c=new FontDialog(this.editorUi,b,d,c,mxUtils.bind(this,function(b,c,d){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1);a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b);"s"!=d&&(a.setCellStyles("FType",d),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,c));d=!0;for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==
-b){d=!1;break}d&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{a.getModel().endUpdate()}}}));this.editorUi.showDialog(c.container,380,250,!0,!0);c.init()}),c,null,!0)})))}})();function DiagramPage(a,e){this.node=a;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(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,e,c){this.ui=a;this.page=e;this.previous=this.name=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,e,c){this.ui=a;this.oldIndex=e;this.newIndex=c}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,e,c){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=c&&(e.viewState=c,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,c=e.graph,b=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(a.node,b);a.viewState=c.getViewState();a.root=c.model.root;null!=a.model&&a.model.rootChanged(a.root);c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.prefix=Editor.guid()+"-";c.model.rootChanged(a.root);
-c.setViewState(a.viewState);c.gridEnabled=c.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();c.view.validate();c.blockMathRender=!0;c.sizeDidChange();c.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,c.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,e,c,b,k){SelectPage.call(this,a,c);this.relatedPage=e;this.index=b;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
+this.addMenuItems(a,["saveAndExit"],c):(this.addMenuItems(a,["save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],c)),"1"!=urlParams.noExitBtn&&this.addMenuItems(a,["exit"],c);else{var e=this.editorUi.getCurrentFile();if(null!=e&&e.constructor==DriveFile){e.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],c);this.addMenuItems(a,["save","-","share"],c);var d=this.addMenuItem(a,"synchronize",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,
+"https://desk.draw.io/support/solutions/articles/16000087947");a.addSeparator(c)}else this.addMenuItems(a,["new"],c);this.addSubmenu("openFrom",a,c);isLocalStorage&&this.addSubmenu("openRecent",a,c);null!=e&&e.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],c):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile&&null==e.fileHandle||(a.addSeparator(c),d=this.addMenuItem(a,"synchronize",c),(!b.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000087947")),this.addMenuItems(a,["-","save","saveAs","-"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=b.getServiceName()||b.isOfflineApp()||null==e||this.addMenuItems(a,["share","-"],c),this.addMenuItems(a,["rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):(this.addMenuItems(a,["makeCopy"],c),null!=e&&e.constructor==OneDriveFile&&
+this.addMenuItems(a,["moveToFolder"],c)));a.addSeparator(c);this.addSubmenu("importFrom",a,c);this.addSubmenu("exportAs",a,c);a.addSeparator(c);this.addSubmenu("embed",a,c);this.addSubmenu("publish",a,c);a.addSeparator(c);this.addSubmenu("newLibrary",a,c);this.addSubmenu("openLibraryFrom",a,c);b.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],c);null!=e&&null!=b.fileNode&&(e=null!=e.getTitle()?e.getTitle():b.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(a,
+["-","properties"]));this.addMenuItems(a,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],c);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var e=document.getElementById("extFont_"+
+b[c].name);null!=e&&e.parentNode.removeChild(e)}a.extFonts=[];for(c=0;null!=this.previousExtFonts&&c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,c){for(var e=mxUtils.bind(this,function(e,d,f){var g=this.editorUi.editor.graph,k=this.styleChange(b,e,[mxConstants.STYLE_FONTFAMILY],[e],null,c,function(){document.execCommand("fontname",!1,
+e);g.addExtFont(e,d)},function(){g.updateLabelElements(g.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&g.replaceElement(a,"div")});g.addExtFont(e,d)});f&&(f=document.createElement("span"),f.className="geSprite geSprite-delete",f.style.cursor="pointer",f.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(f),mxEvent.addListener(f,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(b){var c=mxUtils.clone(this.editorUi.editor.graph.extFonts);
+if(null!=c&&0<c.length)for(var d=0;d<c.length;d++)if(c[d].name==e){c.splice(d,1);break}for(var f=mxUtils.clone(this.customFonts),d=0;d<f.length;d++)if(f[d].name==e){f.splice(d,1);break}c=new a(this.editorUi,c,f);this.editorUi.editor.graph.model.execute(c);this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));k.firstChild.nextSibling.style.fontFamily=e}),d=0;d<this.defaultFonts.length;d++)e(this.defaultFonts[d]);b.addSeparator(c);var f=this.editorUi.editor.graph.extFonts;if(null!=f&&0<f.length){for(var g=
+{},k=!1,d=0;d<this.customFonts.length;d++)g[this.customFonts[d].name]=!0;for(d=0;d<f.length;d++)g[f[d].name]||(this.customFonts.push(f[d]),k=!0);k&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(d=0;d<this.customFonts.length;d++)f=this.customFonts[d].name,g=this.customFonts[d].url,e(f,g,!0),this.editorUi.editor.graph.addExtFont(f,g,!0);b.addSeparator(c);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=
+new a(this.editorUi,[],[]);this.editorUi.editor.graph.model.execute(b)}),c);b.addSeparator(c)}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=mxConstants.DEFAULT_FONTFAMILY,c="s",e=null,d=a.getView().getState(a.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_FONTFAMILY]||b,c=d.style.FType||c,"w"==c&&(e=this.editorUi.editor.graph.extFonts,d=null,null!=e&&(d=e.find(function(a){return a.name==b})),e=null!=d?d.url:mxResources.get("urlNofFound",
+null,"URL not found"),0==e.indexOf(PROXY_URL)&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)))));c=new FontDialog(this.editorUi,b,e,c,mxUtils.bind(this,function(b,c,e){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1);a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b);"s"!=e&&(a.setCellStyles("FType",e),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,c));e=!0;for(var d=0;d<this.customFonts.length;d++)if(this.customFonts[d].name==
+b){e=!1;break}e&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{a.getModel().endUpdate()}}}));this.editorUi.showDialog(c.container,380,250,!0,!0);c.init()}),c,null,!0)})))}})();function DiagramPage(a,d){this.node=a;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(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,d,c){this.ui=a;this.page=d;this.previous=this.name=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(a,d,c){this.ui=a;this.oldIndex=d;this.newIndex=c}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(a,d,c){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=c&&(d.viewState=c,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,d=this.ui.editor,c=d.graph,b=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(a.node,b);a.viewState=c.getViewState();a.root=c.model.root;null!=a.model&&a.model.rootChanged(a.root);c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.prefix=Editor.guid()+"-";c.model.rootChanged(a.root);
+c.setViewState(a.viewState);c.gridEnabled=c.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();c.view.validate();c.blockMathRender=!0;c.sizeDidChange();c.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,c.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(a,d,c,b,g){SelectPage.call(this,a,c);this.relatedPage=d;this.index=b;this.previousIndex=null;this.noSelect=g}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;
-EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==this.currentPage){a=e;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];return null};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var a=this.editor.graph,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=
-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";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var c=null,b=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==this.currentPage){a=d;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var d=0;d<this.pages.length;d++)if(this.pages[d].getId()==a)return this.pages[d];return null};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var a=this.editor.graph,d=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=
+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";b!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(a.view,arguments)});var c=null,b=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
-this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var e=c.getProperty("edit").changes,d=0;d<e.length;d++)if(e[d]instanceof SelectPage||e[d]instanceof RenamePage||e[d]instanceof MovePage||e[d]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(a,e,c){a=null!=a?this.getPageById(a.getId()):null;var b=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,e):(b.setViewState(e),this.editor.updateGraphComponents(),b.view.revalidate(),b.sizeDidChange()),b.container.scrollLeft=b.view.translate.x*b.view.scale+e.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+e.scrollTop,b.restoreSelection(c))};
-Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),f=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null,d=a.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(g){console.log("ExtFonts format error: "+g.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=f&&0<f.length?f:null,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(b)||isNaN(k)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,b,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:d||[]}};
-Graph.prototype.saveViewState=function(a,e,c){c||(e.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),e.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),e.setAttribute("connect",null==a||a.connect?"1":"0"),e.setAttribute("arrows",null==a||a.arrows?"1":"0"),e.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),e.setAttribute("fold",
-null==a||a.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);c=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=c&&(e.setAttribute("pageWidth",c.width),e.setAttribute("pageHeight",c.height));null!=a&&null!=a.background&&e.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&e.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));e.setAttribute("math",
-null!=a&&a.mathEnabled?"1":"0");e.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&e.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
+this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){for(var d=c.getProperty("edit").changes,f=0;f<d.length;f++)if(d[f]instanceof SelectPage||d[f]instanceof RenamePage||d[f]instanceof MovePage||d[f]instanceof mxRootChange){b();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(a,d,c){a=null!=a?this.getPageById(a.getId()):null;var b=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,d):(b.setViewState(d),this.editor.updateGraphComponents(),b.view.revalidate(),b.sizeDidChange()),b.container.scrollLeft=b.view.translate.x*b.view.scale+d.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+d.scrollTop,b.restoreSelection(c))};
+Graph.prototype.createViewState=function(a){var d=a.getAttribute("page"),c=parseFloat(a.getAttribute("pageScale")),b=parseFloat(a.getAttribute("pageWidth")),g=parseFloat(a.getAttribute("pageHeight")),f=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null,n=a.getAttribute("extFonts");if(n)try{n=n.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=f&&0<f.length?f:null,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:isNaN(c)?mxGraph.prototype.pageScale:c,pageFormat:isNaN(b)||isNaN(g)?"undefined"===
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,b,g),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:n||[]}};
+Graph.prototype.saveViewState=function(a,d,c){c||(d.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),d.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),d.setAttribute("connect",null==a||a.connect?"1":"0"),d.setAttribute("arrows",null==a||a.arrows?"1":"0"),d.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),d.setAttribute("fold",
+null==a||a.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);c=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=c&&(d.setAttribute("pageWidth",c.width),d.setAttribute("pageHeight",c.height));null!=a&&null!=a.background&&d.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));d.setAttribute("math",
+null!=a&&a.mathEnabled?"1":"0");d.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&d.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(a,e){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.backgroundImage=a.backgroundImage;this.pageScale=a.pageScale;
-this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var c=this.extFonts;this.extFonts=a.extFonts||[];if(e&&null!=c)for(var b=0;b<c.length;b++){var k=document.getElementById("extFont_"+c[b].name);null!=k&&k.parentNode.removeChild(k)}for(b=0;b<this.extFonts.length;b++)this.addExtFont(this.extFonts[b].name,this.extFonts[b].url,!0);this.view.scale=null!=a.scale?
+Graph.prototype.setViewState=function(a,d){if(null!=a){this.lastPasteXml=a.lastPasteXml;this.pasteCounter=a.pasteCounter||0;this.mathEnabled=a.mathEnabled;this.gridEnabled=a.gridEnabled;this.gridSize=a.gridSize;this.graphHandler.guidesEnabled=a.guidesEnabled;this.foldingEnabled=a.foldingEnabled;this.setShadowVisible(a.shadowVisible,!1);this.scrollbars=a.scrollbars;this.pageVisible=!this.isViewer()&&a.pageVisible;this.background=a.background;this.backgroundImage=a.backgroundImage;this.pageScale=a.pageScale;
+this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var c=this.extFonts;this.extFonts=a.extFonts||[];if(d&&null!=c)for(var b=0;b<c.length;b++){var g=document.getElementById("extFont_"+c[b].name);null!=g&&g.parentNode.removeChild(g)}for(b=0;b<this.extFonts.length;b++)this.addExtFont(this.extFonts[b].name,this.extFonts[b].url,!0);this.view.scale=null!=a.scale?
a.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged",
"state",a))};
-Graph.prototype.addExtFont=function(a,e,c){if(a&&e){var b="extFont_"+a;if(null==document.getElementById(b))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,b);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+e+'");\n}'));k.setAttribute("id",b);document.getElementsByTagName("head")[0].appendChild(k)}if(!c){null==this.extFonts&&(this.extFonts=[]);c=this.extFonts;
-b=!0;for(k=0;k<c.length;k++)if(c[k].name==a){b=!1;break}b&&this.extFonts.push({name:a,url:e})}}};
-EditorUi.prototype.updatePageRoot=function(a,e){if(null==a.root){var c=this.editor.extractGraphModel(a.node,null,e),b=Editor.extractParserError(c);if(b)throw Error(b);null!=c?(a.graphModelNode=c,a.viewState=this.editor.graph.createViewState(c),b=new mxCodec(c.ownerDocument),a.root=b.decode(c).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){c=this.editor.extractGraphModel(a.node);if(b=Editor.extractParserError(c))throw Error(b);null!=c&&(a.graphModelNode=
+Graph.prototype.addExtFont=function(a,d,c){if(a&&d){var b="extFont_"+a;if(null==document.getElementById(b))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,b);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+d+'");\n}'));g.setAttribute("id",b);document.getElementsByTagName("head")[0].appendChild(g)}if(!c){null==this.extFonts&&(this.extFonts=[]);c=this.extFonts;
+b=!0;for(g=0;g<c.length;g++)if(c[g].name==a){b=!1;break}b&&this.extFonts.push({name:a,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(a,d){if(null==a.root){var c=this.editor.extractGraphModel(a.node,null,d),b=Editor.extractParserError(c);if(b)throw Error(b);null!=c?(a.graphModelNode=c,a.viewState=this.editor.graph.createViewState(c),b=new mxCodec(c.ownerDocument),a.root=b.decode(c).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){c=this.editor.extractGraphModel(a.node);if(b=Editor.extractParserError(c))throw Error(b);null!=c&&(a.graphModelNode=
c)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,e,c){try{if(a!=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 b=this.editor.graph.model.createUndoableEdit();b.ignoreEdit=!0;var k=new SelectPage(this,a,c);k.execute();b.add(k);b.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b))}}catch(f){this.handleError(f)}};
-EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());e=null!=e?e:this.pages.length;var c=new ChangePage(this,a,a,e);this.editor.graph.model.execute(c)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
-EditorUi.prototype.createPage=function(a,e){var c=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);c.setName(null!=a?a:this.createPageName());return c};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var c=this.pages[e].getName();null!=c&&0<c.length&&(a[c]=c)}e=this.pages.length;do c=mxResources.get("pageWithNumber",[++e]);while(null!=a[c]);return c};
-EditorUi.prototype.removePage=function(a){try{var e=this.editor.graph,c=mxUtils.indexOf(this.pages,a);if(e.isEnabled()&&0<=c){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var b=this.currentPage;b==a&&1<this.pages.length?(c==this.pages.length-1?c--:c++,b=this.pages[c]):1>=this.pages.length&&(b=this.insertPage(),e.model.execute(new RenamePage(this,b,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,a,b))}finally{e.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
-EditorUi.prototype.duplicatePage=function(a,e){var c=null;try{var b=this.editor.graph;if(b.isEnabled()){b.isEditing()&&b.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");c=new DiagramPage(k);c.root=b.cloneCell(b.model.root);c.viewState=b.getViewState();c.viewState.scale=1;c.viewState.scrollLeft=null;c.viewState.scrollTop=null;c.viewState.currentRoot=null;c.viewState.defaultParent=null;c.setName(e);c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1)}}catch(f){this.handleError(f)}return c};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))};
+EditorUi.prototype.selectPage=function(a,d,c){try{if(a!=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 b=this.editor.graph.model.createUndoableEdit();b.ignoreEdit=!0;var g=new SelectPage(this,a,c);g.execute();b.add(g);b.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b))}}catch(f){this.handleError(f)}};
+EditorUi.prototype.selectNextPage=function(a){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),a?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(a,d){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());d=null!=d?d:this.pages.length;var c=new ChangePage(this,a,a,d);this.editor.graph.model.execute(c)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
+EditorUi.prototype.createPage=function(a,d){var c=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);c.setName(null!=a?a:this.createPageName());return c};EditorUi.prototype.createPageName=function(){for(var a={},d=0;d<this.pages.length;d++){var c=this.pages[d].getName();null!=c&&0<c.length&&(a[c]=c)}d=this.pages.length;do c=mxResources.get("pageWithNumber",[++d]);while(null!=a[c]);return c};
+EditorUi.prototype.removePage=function(a){try{var d=this.editor.graph,c=mxUtils.indexOf(this.pages,a);if(d.isEnabled()&&0<=c){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var b=this.currentPage;b==a&&1<this.pages.length?(c==this.pages.length-1?c--:c++,b=this.pages[c]):1>=this.pages.length&&(b=this.insertPage(),d.model.execute(new RenamePage(this,b,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,a,b))}finally{d.model.endUpdate()}}}catch(g){this.handleError(g)}return a};
+EditorUi.prototype.duplicatePage=function(a,d){var c=null;try{var b=this.editor.graph;if(b.isEnabled()){b.isEditing()&&b.stopEditing();var g=a.node.cloneNode(!1);g.removeAttribute("id");c=new DiagramPage(g);c.root=b.cloneCell(b.model.root);c.viewState=b.getViewState();c.viewState.scale=1;c.viewState.scrollLeft=null;c.viewState.scrollTop=null;c.viewState.currentRoot=null;c.viewState.defaultParent=null;c.setName(d);c=this.insertPage(c,mxUtils.indexOf(this.pages,a)+1)}}catch(f){this.handleError(f)}return c};
+EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,a,c))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return a};EditorUi.prototype.movePage=function(a,d){this.editor.graph.model.execute(new MovePage(this,a,d))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"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 c=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-c)/this.pages.length)+1),k=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(b,c){this.pages[b]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),k=b):mxEvent.consume(c)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){k=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&b!=k&&this.movePage(k,b);a.stopPropagation();a.preventDefault()}));e.appendChild(c)})(f,this.createTabForPage(this.pages[f],b,this.pages[f]!=this.currentPage,f+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);b=this.createPageMenuTab();
-this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-c){null!=b&&(b.style.position="absolute",b.style.right="0px",e.style.marginRight="30px");var l=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var d=this.createControlTab(4,"&nbsp;&#10095;");
-d.style.position="absolute";d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var g=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=g+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,g-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l,0<e.scrollLeft?100:
-50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,g-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(a){var e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"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="dark"==uiTheme?"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";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e};
-EditorUi.prototype.createControlTab=function(a,e){var c=this.createTab(!0);c.style.lineHeight=this.tabContainerHeight+"px";c.style.paddingTop=a+"px";c.style.cursor="pointer";c.style.width="30px";c.innerHTML=e;null!=c.firstChild&&null!=c.firstChild.style&&mxUtils.setOpacity(c.firstChild,40);return c};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display=mxClient.IS_QUIRKS?"inline":"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 c=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+c)/this.pages.length)+1),g=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(b,c){this.pages[b]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=b):mxEvent.consume(c)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){g=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=g&&b!=g&&this.movePage(g,b);a.stopPropagation();a.preventDefault()}));d.appendChild(c)})(f,this.createTabForPage(this.pages[f],b,this.pages[f]!=this.currentPage,f+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(d);b=this.createPageMenuTab();
+this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(d.clientWidth>this.tabContainer.clientWidth-c){null!=b&&(b.style.position="absolute",b.style.right="0px",d.style.marginRight="30px");var l=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);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 e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=e+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){d.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(n,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l,0<d.scrollLeft?100:
+50);mxUtils.setOpacity(n,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){d.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(l,0<d.scrollLeft?100:50);mxUtils.setOpacity(n,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(a){var d=document.createElement("div");d.style.display=mxClient.IS_QUIRKS?"inline":"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="dark"==uiTheme?"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";a&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(d.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(a){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return d};
+EditorUi.prototype.createControlTab=function(a,d){var c=this.createTab(!0);c.style.lineHeight=this.tabContainerHeight+"px";c.style.paddingTop=a+"px";c.style.cursor="pointer";c.style.width="30px";c.innerHTML=d;null!=c.firstChild&&null!=c.firstChild.style&&mxUtils.setOpacity(c.firstChild,40);return c};
EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=
-0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
+0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var e=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(e,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));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 b=
-mxEvent.getClientX(a),e=mxEvent.getClientY(a);c.popup(b,e,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,e,c,b){c=this.createTab(c);var k=a.getName()||mxResources.get("untitled"),f=a.getId();c.setAttribute("title",k+(null!=f?" ("+f+")":"")+" ["+b+"]");mxUtils.write(c,k);c.style.maxWidth=e+"px";c.style.width=e+"px";this.addTabListeners(a,c);42<e&&(c.style.textOverflow="ellipsis");return c};
-EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var c=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,k=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;k=a==this.currentPage;c.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(f)&&k||mxEvent.isPopupTrigger(f))){c.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!b){var l=new mxPopupMenu(this.createPageMenu(a));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);this.resetCurrentMenu();l.destroy()});var d=mxEvent.getClientX(f),g=mxEvent.getClientY(f);l.popup(d,g,null,f);this.setCurrentMenu(l,e)}mxEvent.consume(f)}}))};
-EditorUi.prototype.getLinkForPage=function(a,e,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),k=k+((0==k.length?"?":"&")+"page-id="+a.getId());null!=e&&(k+="&"+e.join("&"));return(c&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+k+"#"+b.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(c,b){var k=this.editor.graph;c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);null!=this.getLinkForPage(a)&&(c.addSeparator(b),c.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,c,d,e,m,n){b=this.createUrlParameters(b,c,d,e,m,n);d||b.push("hide-pages=1");k.isSelectionEmpty()||(d=k.getBoundingBox(k.getSelectionCells()),c=k.view.translate,m=k.view.scale,d.width/=m,d.height/=m,d.x=d.x/m-c.x,d.y=d.y/m-c.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+mxEvent.getClientX(a),d=mxEvent.getClientY(a);c.popup(b,d,null,a);this.setCurrentMenu(c);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
+EditorUi.prototype.createTabForPage=function(a,d,c,b){c=this.createTab(c);var g=a.getName()||mxResources.get("untitled"),f=a.getId();c.setAttribute("title",g+(null!=f?" ("+f+")":"")+" ["+b+"]");mxUtils.write(c,g);c.style.maxWidth=d+"px";c.style.width=d+"px";this.addTabListeners(a,c);42<d&&(c.style.textOverflow="ellipsis");return c};
+EditorUi.prototype.addTabListeners=function(a,d){mxEvent.disableContextMenu(d);var c=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,g=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(d){b=null!=this.currentMenu;g=a==this.currentPage;c.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(c.isEnabled()&&!c.isMouseDown&&(mxEvent.isTouchEvent(f)&&g||mxEvent.isPopupTrigger(f))){c.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!b){var l=new mxPopupMenu(this.createPageMenu(a));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);this.resetCurrentMenu();l.destroy()});var n=mxEvent.getClientX(f),e=mxEvent.getClientY(f);l.popup(n,e,null,f);this.setCurrentMenu(l,d)}mxEvent.consume(f)}}))};
+EditorUi.prototype.getLinkForPage=function(a,d,c){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+a.getId());null!=d&&(g+="&"+d.join("&"));return(c&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+b.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(c,b){var g=this.editor.graph;c.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);c.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);c.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),b);null!=this.getLinkForPage(a)&&(c.addSeparator(b),c.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,c,d,e,k,m){b=this.createUrlParameters(b,c,d,e,k,m);d||b.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),c=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-c.x,d.y=d.y/k-c.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
e=new EmbedDialog(this,this.getLinkForPage(a,b,e));this.showDialog(e.container,440,240,!0,!0);e.init()}))})));c.addSeparator(b);c.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(c.addSeparator(b),c.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
+!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.oldIndex;b.oldIndex=b.newIndex;b.newIndex=a;return b};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,k){k.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(k.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(e,
-a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,k));return k};a.beforeDecode=function(a,b,e){e.ui=a.ui;e.relatedPage=e.ui.getPageById(b.getAttribute("relatedPage"));if(null==e.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));e.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(e.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(e.relatedPage.root=a.decodeCell(c,!1),e=c.nextSibling,c.parentNode.removeChild(c),c=e;null!=c;){e=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var k=c.getAttribute("id");null==a.lookup(k)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=e}}return b};a.afterDecode=function(a,b,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,e,l,d){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),k=0;k<e.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(e[k]),"treeFolding","0")&&this.foldTreeCell(b,e[k]);e=f;e=a.apply(this,arguments)}finally{this.model.endUpdate()}return e};Graph.prototype.foldTreeCell=
-function(a,c){this.model.beginUpdate();try{var b=[];this.traverse(c,!0,mxUtils.bind(this,function(a,e){null!=e&&b.push(e);a!=c&&b.push(a);return a==c||!this.model.isCollapsed(a)}));this.model.setCollapsed(c,a);for(var e=0;e<b.length;e++)this.model.setVisible(b[e],!a)}finally{this.model.endUpdate()}};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 a(a){return v.isVertex(a)&&
-e(a)}function c(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=v.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function d(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),
-null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),e=q.getIncomingEdges(a),f=q.cloneCells([e[0],a]);q.model.setTerminal(f[0],
-q.model.getTerminal(e[0],!0),!0);var g=d(a),k=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=c&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-
-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(e[0],!0));if(null!=p){for(var v=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,t=k=e=0;t<p.length;t++){var u=q.model.getTerminal(p[t],!1);if(g==d(u)){var z=q.view.getState(u);u!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,z)&&(e=10+Math.max(e,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),k=10+Math.max(k,
-(Math.min(n.y+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}v?k=0:e=0;for(t=0;t<p.length;t++)if(u=q.model.getTerminal(p[t],!1),g==d(u)&&(z=q.view.getState(u),u!=a&&null!=z&&(v&&b!=z.getCenterX()<l.getCenterX()||!v&&b!=z.getCenterY()<l.getCenterY()))){var x=[];q.traverse(z.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});q.moveCells(x,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,c)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b=d(a),c=q.getIncomingEdges(a),
-e=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);q.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&
-(m=0);q.moveCells(k,l,m);return q.addCells(e,f)}finally{q.model.endUpdate()}}function n(a,b){q.model.beginUpdate();try{var c=q.model.getParent(a),e=q.getIncomingEdges(a),f=d(a);0==e.length&&(e=[q.createEdge(c,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],
-[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(P){}}var e=q.getOutgoingEdges(a),n=c.geometry,k=[];q.view.currentRoot==c&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var v=q.view.getBounds(k),t=q.view.translate,u=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/
-2:(v.x+v.width)/u-t.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(v.x+v.width)/u-t.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==v?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(v.y+v.height)/u-t.y+-n.y+
-10);return q.addCells(g,c)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(a,b){var c=d(a),e=b==mxConstants.DIRECTION_EAST||
-b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==e&&c!=b?u.actions.get("selectParent").funct():c==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(e=p(q.model.getTerminal(c[0],!0),e,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(e,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=e.length-1&&q.setSelectionCell(e[c].cell)))))}
-var u=this,q=u.editor.graph,v=q.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
-u.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=
-[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,
-c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=q.removeCells;q.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&e(g)&&(d.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),
-b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return y.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var A=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,
-b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||
-q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=q.getIncomingEdges(b[0]);if(0<v.length){var t=q.view.getState(q.model.getTerminal(v[0],!0));if(null!=t){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/q.view.scale,d=(u.getCenterY()-t.getCenterY())/q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(v=q.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var B=u.sidebar.dropAndConnect;
-u.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},D=
-u.onKeyDown;u.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?m(q.getSelectionCell()):n(q.getSelectionCell()):13==b.which&&(c=g(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),
-q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(t(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(t(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(b))}}catch(J){u.handleError(J)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var E=q.connectVertex;q.connectVertex=function(b,c,e,f,k,l,p){var v=q.getIncomingEdges(b);if(a(b)){var t=d(b),u=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,z=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return t==c||0==v.length?n(b,c):u==z?m(b):g(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return E.apply(this,arguments)};q.getSubtree=function(b){var d=
-[b];!c(b)&&!a(b)||l(b)||q.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!l(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position=
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d,
+a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(d.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var g=c.getAttribute("id");null==a.lookup(g)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,d,l,n){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=0;f<d.length;f++)"1"==mxUtils.getValue(this.getCurrentCellStyle(d[f]),"treeFolding","0")&&this.foldTreeCell(b,d[f]);d=e;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};Graph.prototype.foldTreeCell=
+function(a,c){this.model.beginUpdate();try{var b=[];this.traverse(c,!0,mxUtils.bind(this,function(a,d){null!=d&&b.push(d);a!=c&&b.push(a);return a==c||!this.model.isCollapsed(a)}));this.model.setCollapsed(c,a);for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!a)}finally{this.model.endUpdate()}};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 a(a){return v.isVertex(a)&&
+d(a)}function c(a){var b=!1;null!=a&&(b="1"==t.getCurrentCellStyle(a).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),
+null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],
+t.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),l=t.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-
+10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],!0));if(null!=p){for(var v=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<p.length;q++){var u=t.model.getTerminal(p[q],!1);if(f==n(u)){var x=t.view.getState(u);u!=a&&null!=x&&(v&&b!=x.getCenterX()<k.getCenterX()||!v&&b!=x.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,x)&&(d=10+Math.max(d,(Math.min(m.x+m.width,x.x+x.width)-Math.max(m.x,x.x))/l),g=10+Math.max(g,
+(Math.min(m.y+m.height,x.y+x.height)-Math.max(m.y,x.y))/l))}}v?g=0:d=0;for(q=0;q<p.length;q++)if(u=t.model.getTerminal(p[q],!1),f==n(u)&&(x=t.view.getState(u),u!=a&&null!=x&&(v&&b!=x.getCenterX()<k.getCenterX()||!v&&b!=x.getCenterY()<k.getCenterY()))){var y=[];t.traverse(x.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});t.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function k(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),
+d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&
+(l=0);t.moveCells(g,k,l);return t.addCells(d,e)}finally{t.model.endUpdate()}}function m(a,b){t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=n(a);0==d.length&&(d=[t.createEdge(c,null,"",null,null,t.createCurrentEdgeStyle())],e=b);var f=t.cloneCells([d[0],a]);t.model.setTerminal(f[0],a,!0);if(null==t.model.getTerminal(f[0],!1)){t.model.setTerminal(f[0],f[1],!1);var g=t.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),l;for(l in k)t.setCellStyles(l,k[l],
+[f[0]]),"edgeStyle"==l&&"elbowEdgeStyle"==k[l]&&t.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[f[0]])}catch(O){}}var d=t.getOutgoingEdges(a),m=c.geometry,g=[];t.view.currentRoot==c&&(m=new mxRectangle);for(k=0;k<d.length;k++){var p=t.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var v=t.view.getBounds(g),q=t.view.translate,u=t.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/
+2:(v.x+v.width)/u-q.x-m.x+10,f[1].geometry.y+=f[1].geometry.height-m.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(v.x+v.width)/u-q.x+-m.x+10,f[1].geometry.y-=f[1].geometry.height+m.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+m.x+40):f[1].geometry.x+(f[1].geometry.width-m.x+40),f[1].geometry.y=null==v?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(v.y+v.height)/u-q.y+-m.y+
+10);return t.addCells(f,c)}finally{t.model.endUpdate()}}function p(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||
+b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}
+var u=this,t=u.editor.graph,v=t.getModel(),y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
+u.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=
+[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,
+c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var x=t.removeCells;t.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=t.getIncomingEdges(b[f]),
+b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return x.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var A=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,
+b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var B=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||
+t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=t.getIncomingEdges(b[0]);if(0<v.length){var q=t.view.getState(t.model.getTerminal(v[0],!0));if(null!=q){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-q.getCenterX())/t.view.scale,d=(u.getCenterY()-q.getCenterY())/t.view.scale)}}}}l=B.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(v=t.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(v[0],!0))&&this.model.setTerminal(v[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(v[0],!0);e=this.cloneCell(v[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=u.sidebar){var z=u.sidebar.dropAndConnect;
+u.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},D=
+u.onKeyDown;u.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?k(t.getSelectionCell()):m(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),
+t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(q(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(b))}}catch(L){u.handleError(L)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=function(b,c,d,f,g,l,p){var v=t.getIncomingEdges(b);if(a(b)){var q=n(b),u=q==mxConstants.DIRECTION_EAST||q==mxConstants.DIRECTION_WEST,x=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;return q==c||0==v.length?m(b,c):u==x?k(b):e(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=
+[b];!c(b)&&!a(b)||l(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!l(this.state.cell)&&0<this.graph.getOutgoingEdges(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;u.hoverIcons.reset();
-mxEvent.consume(a)})))};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 I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),e=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
+mxEvent.consume(a)})))};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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){J.apply(this,arguments);null!=this.moveHandle&&
+(this.moveHandle.style.display=a?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),d=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;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;b.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;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;b.insertEdge(e,!0);c.insertEdge(e,!1);var k=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};');
-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;b.insertEdge(n,!0);k.insertEdge(n,!1);var p=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};');
-p.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);p.insertEdge(t,!1);var u=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};');
-u.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);u.insertEdge(q,!1);a.insert(e);a.insert(n);a.insert(t);a.insert(q);a.insert(b);a.insert(c);a.insert(k);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var 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;b.insertEdge(m,!0);g.insertEdge(m,!1);var p=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};');
+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;b.insertEdge(q,!0);p.insertEdge(q,!1);var u=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};');
+u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(m);a.insert(q);a.insert(t);a.insert(b);a.insert(c);a.insert(g);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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};');
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-a.vertex=!0;var b=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"};');e.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var c=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"};');
-c.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;b.insertEdge(g,!0);c.insertEdge(g,!1);var k=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"};');k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-n.geometry.relative=!0;n.edge=!0;b.insertEdge(n,!0);k.insertEdge(n,!1);a.insert(g);a.insert(n);a.insert(b);a.insert(c);a.insert(k);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(a,"treeRoot",
+a.vertex=!0;var b=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(b,"treeRoot","1");b.vertex=!0;var c=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"};');
+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;b.insertEdge(e,!0);c.insertEdge(e,!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;b.insertEdge(m,!0);g.insertEdge(m,!1);a.insert(e);a.insert(m);a.insert(b);a.insert(c);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.setAttributeForCell(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;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.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.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;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
-a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function e(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,c.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.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;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
+a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function d(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,c.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||
"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,
"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=
c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(null!=b?b:!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(v){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(v){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");f.apply(this,arguments)};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var d=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
-c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):d.apply(this,arguments)};var g=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){g.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
-"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");f.apply(this,arguments)};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
+c&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):n.apply(this,arguments)};var e=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){e.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var k=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){k.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
-"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var n=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
-!0;n.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
+"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
+!0;m.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);p.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){t.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+this.menus.findWindow=null);p.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){q.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
-function(){e(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
+function(){d(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",
a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):
b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&
-b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var d=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){d.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&
+b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){e.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&
b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,
function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
-c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
+c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
-"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
+"no-repeat",e.style.paddingRight="22px");return e}function e(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var e=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=e}p=n.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>c)||b("diagram");f([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
-a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)],a?60:null);e=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([e,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)],a?60:null);if(411<=c&&(e=l.actions.get("undo"),a=l.actions.get("redo"),e=d("",e.funct,null,mxResources.get("undo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
-a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([e,a],60),480<=c)){var a=l.actions.get("zoomIn"),e=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=c?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=c?d("",e.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==O&&(e=t.addMenu("",a.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor=
-"pointer",e.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(e),O=e),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=c||null!=urlParams.clibs||
-null!=urlParams.libs)&&e(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var d=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=d}p=n.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>c)||b("diagram");f([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)],a?60:null);d=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([d,e(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)],a?60:null);if(411<=c&&(d=l.actions.get("undo"),a=l.actions.get("redo"),d=e("",d.funct,null,mxResources.get("undo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=e("",
+a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([d,a],60),480<=c)){var a=l.actions.get("zoomIn"),d=l.actions.get("zoomOut"),g=l.actions.get("resetView");
+f([e("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=c?e("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=c?e("",d.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==N&&(d=q.addMenu("",a.funct),d.setAttribute("title",mxResources.get("language")),d.className="geToolbarButton",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.position="absolute",d.style.height="24px",d.style.width="24px",d.style.zIndex="1",d.style.right="8px",d.style.cursor=
+"pointer",d.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(d),N=d),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=c||null!=urlParams.clibs||
+null!=urlParams.libs)&&d(this,!0);1E3<=c&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
-l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
-l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var G=t.addMenu("100%",K.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration=
-"none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.cursor="pointer";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";G.style.height=parseInt(l.tabContainerHeight)-1+"px";G.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";I.appendChild(G);K=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}I.appendChild(l.tabContainer);I.appendChild(n);I.appendChild(l.diagramContainer);
-k.appendChild(I);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,l){var d=c.y,f=c.x,k=!1,n=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,t=new mxCellState,u=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);t.x=b.x+f;t.y=b.y+d;t.width=b.width;t.height=b.height;for(var v=[],x=[],y=0;y<this.states.length;y++){var A=this.states[y];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((t.x>=A.x&&t.x<=A.x+A.width||A.x>=t.x&&A.x<=t.x+t.width)&&(t.y>
-A.y+A.height+4||t.y+t.height+4<A.y)?v.push(A):(t.y>=A.y&&t.y<=A.y+A.height||A.y>=t.y&&A.y<=t.y+t.height)&&(t.x>A.x+A.width+4||t.x+t.width+4<A.x)&&x.push(A))}var z=0,B=0,C=A=0,D=0,E=0,F=0,H=0,I=5*u;if(1<v.length){v.push(t);v.sort(function(a,b){return a.y-b.y});var K=!1,y=t==v[0],u=t==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(t==v[y]){u=v[y-1];y=v[y+1];A=B=C=(y.y-u.y-u.height-t.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],G=v[y+1],L=t==u||t==G,G=G.y-u.y-u.height,K=K|t==u;if(0==B&&
-0==z)B=G,z=1;else if(Math.abs(B-G)<=(L||1==y&&K?q:0))z+=1;else if(1<z&&K){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!K)z=0,A=B=0!=C?C:0,v.splice(0,0==y?1:y),y=-1;else break;0!=A||L||(B=A=G)}3==v.length&&v[1]==t&&(A=0)}if(1<x.length){x.push(t);x.sort(function(a,b){return a.x-b.x});K=!1;y=t==x[0];u=t==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(t==x[y]){u=x[y-1];y=x[y+1];F=E=H=(y.x-u.x-u.width-t.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];G=x[y+1];L=t==u||t==G;G=G.x-u.x-u.width;K|=t==
-u;if(0==E&&0==D)E=G,D=1;else if(Math.abs(E-G)<=(L||1==y&&K?q:0))D+=1;else if(1<D&&K){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!K)D=0,F=E=0!=H?H:0,x.splice(0,0==y?1:y),y=-1;else break;0!=F||L||(E=F=G)}3==x.length&&x[1]==t&&(F=0)}q=function(a,b,c,d){var e=[],f;d?(d=I,f=0):(d=0,f=I);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};E=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];H=p.guidesArrHor;k=[];f=0;y=x[0]==t?1:0;K=x[y].y+x[y].height;if(0<F)for(y=0;y<x.length-1;y++)u=
-x[y],G=x[y+1],t==u?(f=G.x-u.width-F,k.push(new mxPoint(f+u.width+I,K)),k.push(new mxPoint(G.x-I,K))):t==G?(k.push(new mxPoint(u.x+u.width+I,K)),f=u.x+u.width+F,k.push(new mxPoint(f-I,K))):(k.push(new mxPoint(u.x+u.width+I,K)),k.push(new mxPoint(G.x-I,K)));else u=x[0],y=x[2],f=u.x+u.width+(y.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+I,K)),k.push(new mxPoint(f-I,K)),k.push(new mxPoint(f+t.width+I,K)),k.push(new mxPoint(y.x-I,K));for(y=0;y<k.length;y+=2)x=k[y],F=k[y+1],x=q(x,F,null!=H?
-H[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=k.length/2;null!=H&&y<H.length;y++)H[y].destroy();p.guidesArrHor=D;f-=b.x;k=!0}else E(!0);if(1<z&&z==v.length-1){D=[];H=p.guidesArrVer;n=[];d=0;y=v[0]==t?1:0;z=v[y].x+v[y].width;if(0<A)for(y=0;y<v.length-1;y++)u=v[y],G=v[y+1],t==u?(d=G.y-u.height-A,n.push(new mxPoint(z,d+u.height+I)),n.push(new mxPoint(z,G.y-I))):t==G?(n.push(new mxPoint(z,u.y+u.height+I)),d=u.y+u.height+A,n.push(new mxPoint(z,d-I))):(n.push(new mxPoint(z,u.y+
-u.height+I)),n.push(new mxPoint(z,G.y-I)));else u=v[0],y=v[2],d=u.y+u.height+(y.y-u.y-u.height-t.height)/2,n.push(new mxPoint(z,u.y+u.height+I)),n.push(new mxPoint(z,d-I)),n.push(new mxPoint(z,d+t.height+I)),n.push(new mxPoint(z,y.y-I));for(y=0;y<n.length;y+=2)x=n[y],F=n[y+1],x=q(x,F,null!=H?H[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=n.length/2;null!=H&&y<H.length;y++)H[y].destroy();p.guidesArrVer=D;d-=b.y;n=!0}else E(!1,!0)}if(k||n)return t=new mxPoint(f,d),v=a.call(this,
-b,t,e,l),k&&!n?t.y=v.y:n&&!k&&(t.x=v.x),v.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;E(!0,!0);return a.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){e.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
-c)for(l=0;l<c.length;l++)c[l].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,e=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=e){for(f=0;f<e.length;f++)e[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,e,c,b){function k(){var b=a.diagramContainer;m.style.top=b.offsetTop-l+"px";m.style.left=b.offsetLeft-l+"px";m.style.width=(c?0:b.offsetWidth)+l+"px";m.style.height=(c?b.offsetHeight:0)+l+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var l=this.RULER_THICKNESS,d=this;this.unit=e;var g="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
-strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},m=document.createElement("div");m.style.position="absolute";m.style.background=g.bkgClr;m.style[c?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;m.style.borderLeft="0.5px solid "+g.strokeClr;document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=a.refresh;a.refresh=function(b){d.editorUiRefresh.apply(a,
-arguments);k()};k();var n=document.createElement("canvas");n.width=m.offsetWidth;n.height=m.offsetHeight;m.style.overflow="hidden";n.style.position="relative";m.appendChild(n);var p=n.getContext("2d");this.ui=a;var t=a.editor.graph;this.graph=t;this.container=m;this.canvas=n;var u=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
-p.restore()):p.fillText(f,a,b))},q=function(){p.clearRect(0,0,n.width,n.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=g.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var a=t.view.scale,b=t.view.getBackgroundPageBounds(),e=t.view.translate,f=t.view.getGraphBounds(),k=t.pageVisible,m=k?l+(c?b.y-t.container.scrollTop:b.x-t.container.scrollLeft):l+(c?e.y-t.container.scrollTop:e.x-t.container.scrollLeft),q=0;k&&(q=c?Math.floor(((f.y+1)/a-e.y)/t.pageFormat.height)*t.pageFormat.height*
-a:Math.floor(((f.x+1)/a-e.x)/t.pageFormat.width)*t.pageFormat.width*a);var D,E,F;switch(d.unit){case mxConstants.POINTS:D=F=10;E=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:F=10;D=mxConstants.PIXELS_PER_MM;E=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:F=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/F,E=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}e=D;2<=a?e=D/(2*Math.floor(a/2)):.5>=a&&(e=D*Math.floor(1/a/2)*(d.unit==mxConstants.MILLIMETERS?2:1));D=null;b=k?Math.min(m+(c?b.height:b.width),
-c?n.height:n.width):c?n.height:n.width;k&&(p.fillStyle=g.outBkgClr,c?(p.fillRect(0,l,l,m-l),p.fillRect(0,b,l,n.height)):(p.fillRect(l,0,m-l,l),p.fillRect(b,0,n.width,l)));p.fillStyle=g.fontClr;for(k=k?m:m%(e*a);k<=b;k+=e*a)if(f=Math.round((k-m)/a/e),!(k<l||f==D)){D=f;var H=null;0==f%F&&(H=d.formatText(q+f*e)+"");c?u(l-E[Math.abs(f)%F],k,l,k,H):u(k,l-E[Math.abs(f)%F],k,l,H)}p.lineWidth=1;u(c?0:l,c?l:0,l,l);p.fillStyle=g.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=q;this.sizeListener=e=f(function(){var a=
-t.container;c?(a=a.offsetHeight+l,n.height!=a&&(n.height=a,m.style.height=a+"px",q())):(a=a.offsetWidth+l,n.width!=a&&(n.width=a,m.style.width=a+"px",q()))},10);this.pageListener=function(){q()};this.scrollListener=b=f(function(){var a=c?t.container.scrollTop:t.container.scrollLeft;d.lastScroll!=a&&(d.lastScroll=a,q())},10);this.unitListener=function(a,b){d.setUnit(b.getProperty("unit"))};t.addListener(mxEvent.SIZE,e);t.container.addEventListener("scroll",b);t.view.addListener("unitChanged",this.unitListener);
-a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){g=a;m.style.background=g.bkgClr;q()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,e,f){var k;if(c&&4<a.height||!c&&4<a.width){if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,
-d.guidePart.x3,d.guidePart.y3)}catch(L){}k=d.origGuideMove.apply(this,arguments);try{var m,n,q,t,v,y,x,A,G;p.lineWidth=.5;p.strokeStyle=g.guideClr;p.setLineDash([2]);c?(n=a.y+k.y+l-this.graph.container.scrollTop,m=0,v=n+a.height/2,t=l/2,A=n+a.height,x=0,q=p.getImageData(m,n-1,l,3),u(m,n,l,n),n--,y=p.getImageData(t,v-1,l,3),u(t,v,l,v),v--,G=p.getImageData(x,A-1,l,3),u(x,A,l,A),A--):(n=0,m=a.x+k.x+l-this.graph.container.scrollLeft,v=l/2,t=m+a.width/2,A=0,x=m+a.width,q=p.getImageData(m-1,n,3,l),u(m,
-n,m,l),m--,y=p.getImageData(t-1,v,3,l),u(t,v,t,l),t--,G=p.getImageData(x-1,A,3,l),u(x,A,x,l),x--);if(null==d.guidePart||d.guidePart.x1!=m||d.guidePart.y1!=n)d.guidePart={imgData1:q,x1:m,y1:n,imgData2:y,x2:t,y2:v,imgData3:G,x3:x,y3:A}}catch(L){}}else k=d.origGuideMove.apply(this,arguments);return k};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{p.putImageData(d.guidePart.imgData1,d.guidePart.x1,
-d.guidePart.y1),p.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),p.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
+l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,J=document.createElement("div");J.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var I=
+l.menus.get("viewZoom");if(null!=I){this.tabContainer.style.right="70px";var G=q.addMenu("100%",I.funct);G.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");G.style.whiteSpace="nowrap";G.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";G.style.backgroundPosition="right 6px center";G.style.backgroundRepeat="no-repeat";G.style.backgroundColor="#ffffff";G.style.paddingRight="10px";G.style.display="block";G.style.position="absolute";G.style.textDecoration="none";G.style.textDecoration=
+"none";G.style.right="0px";G.style.bottom="0px";G.style.overflow="hidden";G.style.visibility="hidden";G.style.textAlign="center";G.style.color="#000";G.style.fontSize="12px";G.style.color="#707070";G.style.width="59px";G.style.cursor="pointer";G.style.borderTop="1px solid lightgray";G.style.borderLeft="1px solid lightgray";G.style.height=parseInt(l.tabContainerHeight)-1+"px";G.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";J.appendChild(G);I=mxUtils.bind(this,function(){G.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);l.editor.addListener("resetGraphView",I);l.editor.addListener("pageSelected",I);var M=l.setGraphEnabled;l.setGraphEnabled=function(){M.apply(this,arguments);null!=this.tabContainer&&(G.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}J.appendChild(l.tabContainer);J.appendChild(n);J.appendChild(l.diagramContainer);
+k.appendChild(J);l.updateTabContainer();var N=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,l){var f=c.y,e=c.x,g=!1,m=!1;if(null!=this.states&&null!=b&&null!=c){var p=this,q=new mxCellState,u=this.graph.getView().scale,t=Math.max(2,this.getGuideTolerance()/2);q.x=b.x+e;q.y=b.y+f;q.width=b.width;q.height=b.height;for(var v=[],y=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((q.x>=A.x&&q.x<=A.x+A.width||A.x>=q.x&&A.x<=q.x+q.width)&&(q.y>
+A.y+A.height+4||q.y+q.height+4<A.y)?v.push(A):(q.y>=A.y&&q.y<=A.y+A.height||A.y>=q.y&&A.y<=q.y+q.height)&&(q.x>A.x+A.width+4||q.x+q.width+4<A.x)&&y.push(A))}var B=0,z=0,C=A=0,D=0,F=0,E=0,H=0,J=5*u;if(1<v.length){v.push(q);v.sort(function(a,b){return a.y-b.y});var I=!1,x=q==v[0],u=q==v[v.length-1];if(!x&&!u)for(x=1;x<v.length-1;x++)if(q==v[x]){u=v[x-1];x=v[x+1];A=z=C=(x.y-u.y-u.height-q.height)/2;break}for(x=0;x<v.length-1;x++){var u=v[x],G=v[x+1],M=q==u||q==G,G=G.y-u.y-u.height,I=I|q==u;if(0==z&&
+0==B)z=G,B=1;else if(Math.abs(z-G)<=(M||1==x&&I?t:0))B+=1;else if(1<B&&I){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!I)B=0,A=z=0!=C?C:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||M||(z=A=G)}3==v.length&&v[1]==q&&(A=0)}if(1<y.length){y.push(q);y.sort(function(a,b){return a.x-b.x});I=!1;x=q==y[0];u=q==y[y.length-1];if(!x&&!u)for(x=1;x<y.length-1;x++)if(q==y[x]){u=y[x-1];x=y[x+1];E=F=H=(x.x-u.x-u.width-q.width)/2;break}for(x=0;x<y.length-1;x++){u=y[x];G=y[x+1];M=q==u||q==G;G=G.x-u.x-u.width;I|=q==
+u;if(0==F&&0==D)F=G,D=1;else if(Math.abs(F-G)<=(M||1==x&&I?t:0))D+=1;else if(1<D&&I){y=y.slice(0,x+1);break}else if(3<=y.length-x&&!I)D=0,E=F=0!=H?H:0,y.splice(0,0==x?1:x),x=-1;else break;0!=E||M||(F=E=G)}3==y.length&&y[1]==q&&(E=0)}t=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(p.graph.getView().getOverlayPane());return a};F=function(a,b){if(a&&null!=p.guidesArrHor)for(var c=0;c<p.guidesArrHor.length;c++)p.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=p.guidesArrVer)for(c=0;c<p.guidesArrVer.length;c++)p.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==y.length-1){D=[];H=p.guidesArrHor;g=[];e=0;x=y[0]==q?1:0;I=y[x].y+y[x].height;if(0<E)for(x=0;x<y.length-1;x++)u=
+y[x],G=y[x+1],q==u?(e=G.x-u.width-E,g.push(new mxPoint(e+u.width+J,I)),g.push(new mxPoint(G.x-J,I))):q==G?(g.push(new mxPoint(u.x+u.width+J,I)),e=u.x+u.width+E,g.push(new mxPoint(e-J,I))):(g.push(new mxPoint(u.x+u.width+J,I)),g.push(new mxPoint(G.x-J,I)));else u=y[0],x=y[2],e=u.x+u.width+(x.x-u.x-u.width-q.width)/2,g.push(new mxPoint(u.x+u.width+J,I)),g.push(new mxPoint(e-J,I)),g.push(new mxPoint(e+q.width+J,I)),g.push(new mxPoint(x.x-J,I));for(x=0;x<g.length;x+=2)y=g[x],E=g[x+1],y=t(y,E,null!=H?
+H[x/2]:null),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=g.length/2;null!=H&&x<H.length;x++)H[x].destroy();p.guidesArrHor=D;e-=b.x;g=!0}else F(!0);if(1<B&&B==v.length-1){D=[];H=p.guidesArrVer;m=[];f=0;x=v[0]==q?1:0;B=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)u=v[x],G=v[x+1],q==u?(f=G.y-u.height-A,m.push(new mxPoint(B,f+u.height+J)),m.push(new mxPoint(B,G.y-J))):q==G?(m.push(new mxPoint(B,u.y+u.height+J)),f=u.y+u.height+A,m.push(new mxPoint(B,f-J))):(m.push(new mxPoint(B,u.y+
+u.height+J)),m.push(new mxPoint(B,G.y-J)));else u=v[0],x=v[2],f=u.y+u.height+(x.y-u.y-u.height-q.height)/2,m.push(new mxPoint(B,u.y+u.height+J)),m.push(new mxPoint(B,f-J)),m.push(new mxPoint(B,f+q.height+J)),m.push(new mxPoint(B,x.y-J));for(x=0;x<m.length;x+=2)y=m[x],E=m[x+1],y=t(y,E,null!=H?H[x/2]:null,!0),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=m.length/2;null!=H&&x<H.length;x++)H[x].destroy();p.guidesArrVer=D;f-=b.y;m=!0}else F(!1,!0)}if(g||m)return q=new mxPoint(e,f),v=a.call(this,
+b,q,d,l),g&&!m?q.y=v.y:m&&!g&&(q.x=v.x),v.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var l=0;l<b.length;l++)b[l].node.style.visibility=a?"visible":"hidden";if(null!=
+c)for(l=0;l<c.length;l++)c[l].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;k.style.top=b.offsetTop-l+"px";k.style.left=b.offsetLeft-l+"px";k.style.width=(c?0:b.offsetWidth)+l+"px";k.style.height=(c?b.offsetHeight:0)+l+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var l=this.RULER_THICKNESS,n=this;this.unit=d;var e="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
+strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},k=document.createElement("div");k.style.position="absolute";k.style.background=e.bkgClr;k.style[c?"borderRight":"borderBottom"]="0.5px solid "+e.strokeClr;k.style.borderLeft="0.5px solid "+e.strokeClr;document.body.appendChild(k);mxEvent.disableContextMenu(k);this.editorUiRefresh=a.refresh;a.refresh=function(b){n.editorUiRefresh.apply(a,
+arguments);g()};g();var m=document.createElement("canvas");m.width=k.offsetWidth;m.height=k.offsetHeight;k.style.overflow="hidden";m.style.position="relative";k.appendChild(m);var p=m.getContext("2d");this.ui=a;var q=a.editor.graph;this.graph=q;this.container=k;this.canvas=m;var u=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);p.beginPath();p.moveTo(a+.5,b+.5);p.lineTo(d+.5,e+.5);p.stroke();f&&(c?(p.save(),p.translate(a,b),p.rotate(-Math.PI/2),p.fillText(f,0,0),
+p.restore()):p.fillText(f,a,b))},t=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 a=q.view.scale,b=q.view.getBackgroundPageBounds(),d=q.view.translate,f=q.view.getGraphBounds(),g=q.pageVisible,k=g?l+(c?b.y-q.container.scrollTop:b.x-q.container.scrollLeft):l+(c?d.y-q.container.scrollTop:d.x-q.container.scrollLeft),t=0;g&&(t=c?Math.floor(((f.y+1)/a-d.y)/q.pageFormat.height)*q.pageFormat.height*
+a:Math.floor(((f.x+1)/a-d.x)/q.pageFormat.width)*q.pageFormat.width*a);var D,F,E;switch(n.unit){case mxConstants.POINTS:D=E=10;F=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:E=10;D=mxConstants.PIXELS_PER_MM;F=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:E=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/E,F=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}d=D;2<=a?d=D/(2*Math.floor(a/2)):.5>=a&&(d=D*Math.floor(1/a/2)*(n.unit==mxConstants.MILLIMETERS?2:1));D=null;b=g?Math.min(k+(c?b.height:b.width),
+c?m.height:m.width):c?m.height:m.width;g&&(p.fillStyle=e.outBkgClr,c?(p.fillRect(0,l,l,k-l),p.fillRect(0,b,l,m.height)):(p.fillRect(l,0,k-l,l),p.fillRect(b,0,m.width,l)));p.fillStyle=e.fontClr;for(g=g?k:k%(d*a);g<=b;g+=d*a)if(f=Math.round((g-k)/a/d),!(g<l||f==D)){D=f;var H=null;0==f%E&&(H=n.formatText(t+f*d)+"");c?u(l-F[Math.abs(f)%E],g,l,g,H):u(g,l-F[Math.abs(f)%E],g,l,H)}p.lineWidth=1;u(c?0:l,c?l:0,l,l);p.fillStyle=e.cornerClr;p.fillRect(0,0,l,l)};this.drawRuler=t;this.sizeListener=d=f(function(){var a=
+q.container;c?(a=a.offsetHeight+l,m.height!=a&&(m.height=a,k.style.height=a+"px",t())):(a=a.offsetWidth+l,m.width!=a&&(m.width=a,k.style.width=a+"px",t()))},10);this.pageListener=function(){t()};this.scrollListener=b=f(function(){var a=c?q.container.scrollTop:q.container.scrollLeft;n.lastScroll!=a&&(n.lastScroll=a,t())},10);this.unitListener=function(a,b){n.setUnit(b.getProperty("unit"))};q.addListener(mxEvent.SIZE,d);q.container.addEventListener("scroll",b);q.view.addListener("unitChanged",this.unitListener);
+a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){e=a;k.style.background=e.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,f){var g;if(c&&4<a.height||!c&&4<a.width){if(null!=n.guidePart)try{p.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),p.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),p.putImageData(n.guidePart.imgData3,
+n.guidePart.x3,n.guidePart.y3)}catch(M){}g=n.origGuideMove.apply(this,arguments);try{var k,m,q,t,v,x,y,A,G;p.lineWidth=.5;p.strokeStyle=e.guideClr;p.setLineDash([2]);c?(m=a.y+g.y+l-this.graph.container.scrollTop,k=0,v=m+a.height/2,t=l/2,A=m+a.height,y=0,q=p.getImageData(k,m-1,l,3),u(k,m,l,m),m--,x=p.getImageData(t,v-1,l,3),u(t,v,l,v),v--,G=p.getImageData(y,A-1,l,3),u(y,A,l,A),A--):(m=0,k=a.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+a.width/2,A=0,y=k+a.width,q=p.getImageData(k-1,m,3,l),u(k,
+m,k,l),k--,x=p.getImageData(t-1,v,3,l),u(t,v,t,l),t--,G=p.getImageData(y-1,A,3,l),u(y,A,y,l),y--);if(null==n.guidePart||n.guidePart.x1!=k||n.guidePart.y1!=m)n.guidePart={imgData1:q,x1:k,y1:m,imgData2:x,x2:t,y2:v,imgData3:G,x3:y,y3:A}}catch(M){}}else g=n.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{p.putImageData(n.guidePart.imgData1,n.guidePart.x1,
+n.guidePart.y1),p.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),p.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(y){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(a,e){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,e,!0);this.hRuler=new mxRuler(a,e,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
-function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(e){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!c){var d=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));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);a.resetCurrentMenu();d.destroy()});var f=mxEvent.getClientX(e),k=mxEvent.getClientY(e);d.popup(f,k,null,e);a.setCurrentMenu(d,b)}mxEvent.consume(e)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
-mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var e=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=e){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,k=[],f,l=[],d,g=!1,m=!0,n=[],p=!1,t=!0;this.setClosedPath=function(a){g=a};this.setAutoClose=function(a){m=a};this.setStopClickEnabled=function(a){t=a};this.setSmoothing=function(a){c=a};var u=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
-b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(b){var c=t&&0<l.length&&null!=d&&2>d.length;c||l.push.apply(l,d);d=[];l.push(null);k.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<k.length){for(var c=l[0].x,d=l[0].x,e=l[0].y,f=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),e=Math.max(e,
-l[n].y),f=Math.min(f,l[n].y));c-=d;e-=f;if(0<c&&0<e){var p=100/c,q=100/e;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-f)*q;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var x=l[n];if(null==x){var x=!1,v=l[v],y=l[n-1];!g&&m&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(g||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(g||x?"<fillstroke/>":"<stroke/>");v=n+1}else t=n==v?t+('<path><move x="'+x.x.toFixed(2)+
-'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,L=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),n);L.vertex=1;a.model.beginUpdate();try{L=a.addCell(L)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[L]));a.fireEvent(new mxEventObject("freehandInserted","cell",L));setTimeout(function(){a.setSelectionCells([L])},
-10)}for(n=0;n<k.length;n++)k[n].parentNode.removeChild(k[n]);b=null;k=[];l=[]}u(!1)};mxEvent.addGestureListeners(e,function(c){if(p){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var k=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",k=k.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",k)}n=[];k=v(c);x(k);f="M"+k.x+" "+k.y;l.push(k);d=[];b.setAttribute("d",f);e.appendChild(b);mxEvent.consume(c)}},function(a){if(b){x(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;l.push(c);var e="";d=[];for(var g=2;g<n.length;g+=2)c=y(g),e+=" L"+c.x+" "+c.y,d.push(c);b.setAttribute("d",f+e)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b))},x=function(a){for(n.push(a);n.length>c;)n.shift()},y=function(a){var b=n.length;if(1===b%2||b>=c){var d=0,e=0,f,g=0;for(f=a;f<b;f++)g++,a=n[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}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 mxDualRuler(a,d){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,d,!0);this.hRuler=new mxRuler(a,d,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,
+function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var f=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));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);a.resetCurrentMenu();f.destroy()});var e=mxEvent.getClientX(d),g=mxEvent.getClientY(d);f.popup(e,g,null,d);a.setCurrentMenu(f,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
+mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,l=[],n,e=!1,k=!0,m=[],p=!1,q=!0;this.setClosedPath=function(a){e=a};this.setAutoClose=function(a){k=a};this.setStopClickEnabled=function(a){q=a};this.setSmoothing=function(a){c=a};var u=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
+b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return p};var t=mxUtils.bind(this,function(a){if(b){var c=q&&0<l.length&&null!=n&&2>n.length;c||l.push.apply(l,n);n=[];l.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=l[0].x,d=l[0].x,f=l[0].y,m=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(c=Math.max(c,l[n].x),d=Math.min(d,l[n].x),f=Math.max(f,
+l[n].y),m=Math.min(m,l[n].y));c-=d;f-=m;if(0<c&&0<f){var p=100/c,q=100/f;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-m)*q;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var x=l[n];if(null==x){var x=!1,v=l[v],y=l[n-1];!e&&k&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(e||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(e||x?"<fillstroke/>":"<stroke/>");v=n+1}else t=n==v?t+('<path><move x="'+x.x.toFixed(2)+
+'" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,M=new mxCell("",new mxGeometry(d/t-v.x,m/t-v.y,c/t,f/t),n);M.vertex=1;a.model.beginUpdate();try{M=a.addCell(M)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[M]));a.fireEvent(new mxEventObject("freehandInserted","cell",M));setTimeout(function(){a.setSelectionCells([M])},
+10)}for(n=0;n<g.length;n++)g[n].parentNode.removeChild(g[n]);b=null;g=[];l=[]}u(!1)};mxEvent.addGestureListeners(d,function(c){if(p){var e=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),e=Math.max(1,e*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",e);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var g=
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",g=g.split(" ").map(function(a){return parseFloat(a)*e}).join(" ");b.setAttribute("stroke-dasharray",g)}m=[];g=v(c);y(g);f="M"+g.x+" "+g.y;l.push(g);n=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){y(v(a));var c=x(0);if(c){f+=" L"+c.x+" "+c.y;l.push(c);var d="";n=[];for(var e=2;e<m.length;e+=2)c=x(e),d+=" L"+c.x+" "+c.y,n.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},t);var v=function(b){return mxUtils.convertPoint(a.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b))},y=function(a){for(m.push(a);m.length>c;)m.shift()},x=function(a){var b=m.length;if(1===b%2||b>=c){var d=0,e=0,f,g=0;for(f=a;f<b;f++)g++,a=m[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index e6e7bcbf..b44ec971 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -1745,7 +1745,7 @@ App.prototype.showNameChangeBanner = function()
*/
App.prototype.showDownloadDesktopBanner = function()
{
- var link = 'https://get.draw.io/';
+ var link = 'https://get.diagrams.net/';
if (this.showBanner('DesktopFooter', mxResources.get('downloadDesktop'), mxUtils.bind(this, function()
{
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 3a5e51ee..f4c0b7c5 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -778,6 +778,122 @@
};
/**
+ * Adds keyboard shortcuts for page handling.
+ */
+ var editorUiCreateKeyHandler = EditorUi.prototype.createKeyHandler;
+ EditorUi.prototype.createKeyHandler = function(editor)
+ {
+ var keyHandler = editorUiCreateKeyHandler.apply(this, arguments);
+
+ if (!this.editor.chromeless || this.editor.editable)
+ {
+ var keyHandlerGetFunction = keyHandler.getFunction;
+ var graph = this.editor.graph;
+ var ui = this;
+
+ keyHandler.getFunction = function(evt)
+ {
+ if (graph.isSelectionEmpty() && ui.pages != null && ui.pages.length > 0)
+ {
+ var idx = ui.getSelectedPageIndex();
+
+ if (mxEvent.isShiftDown(evt))
+ {
+ if (evt.keyCode == 37)
+ {
+ return function()
+ {
+ if (idx > 0)
+ {
+ ui.movePage(idx, idx - 1);
+ }
+ };
+ }
+ else if (evt.keyCode == 38)
+ {
+ return function()
+ {
+ if (idx > 0)
+ {
+ ui.movePage(idx, 0);
+ }
+ };
+ }
+ else if (evt.keyCode == 39)
+ {
+ return function()
+ {
+ if (idx < ui.pages.length - 1)
+ {
+ ui.movePage(idx, idx + 1);
+ }
+ };
+ }
+ else if (evt.keyCode == 40)
+ {
+ return function()
+ {
+ if (idx < ui.pages.length - 1)
+ {
+ ui.movePage(idx, ui.pages.length - 1);
+ }
+ };
+ }
+ }
+ else if (mxEvent.isControlDown(evt) || (mxClient.IS_MAC && mxEvent.isMetaDown(evt)))
+ {
+ if (evt.keyCode == 37)
+ {
+ return function()
+ {
+ if (idx > 0)
+ {
+ ui.selectNextPage(false);
+ }
+ };
+ }
+ else if (evt.keyCode == 38)
+ {
+ return function()
+ {
+ if (idx > 0)
+ {
+ ui.selectPage(ui.pages[0]);
+ }
+ };
+ }
+ else if (evt.keyCode == 39)
+ {
+ return function()
+ {
+ if (idx < ui.pages.length - 1)
+ {
+ ui.selectNextPage(true);
+ }
+ };
+ }
+ else if (evt.keyCode == 40)
+ {
+ return function()
+ {
+ if (idx < ui.pages.length - 1)
+ {
+ ui.selectPage(ui.pages[ui.pages.length - 1]);
+ }
+ };
+ }
+
+ }
+ }
+
+ return keyHandlerGetFunction.apply(this, arguments);
+ };
+ }
+
+ return keyHandler;
+ };
+
+ /**
* Extracts the mxfile from the given HTML data from a data transfer event.
*/
var editorUiExtractGraphModelFromHtml = EditorUi.prototype.extractGraphModelFromHtml;
@@ -4151,7 +4267,9 @@
// to avoid the browser to automatically append .xml instead
if (mimeType == 'text/xml' &&
!/(\.drawio)$/i.test(filename) &&
- !/(\.xml)$/i.test(filename))
+ !/(\.xml)$/i.test(filename) &&
+ !/(\.svg)$/i.test(filename) &&
+ !/(\.html)$/i.test(filename))
{
defaultExtension = (defaultExtension != null) ? defaultExtension : 'drawio';
filename = filename + '.' + defaultExtension;
@@ -6773,7 +6891,26 @@
}
else
{
- onerror({});
+ try
+ {
+ if (xhr.responseType == '' || xhr.responseType == 'text')
+ {
+ onerror({message: xhr.responseText});
+ }
+ else
+ {
+ var reader = new FileReader();
+ reader.onload = function()
+ {
+ onerror({message: JSON.parse(reader.result).Message});
+ }
+ reader.readAsText(xhr.response);
+ }
+ }
+ catch(e)
+ {
+ onerror({});
+ }
}
}
});
@@ -8853,18 +8990,14 @@
{
// Defines additional hotkeys
this.keyHandler.bindAction(70, true, 'find'); // Ctrl+F
- this.keyHandler.bindAction(67, true, 'copyStyle', true); // Ctrl+Shift+C
- this.keyHandler.bindAction(86, true, 'pasteStyle', true); // Ctrl+Shift+V
- this.keyHandler.bindAction(77, true, 'editGeometry', true); // Ctrl+Shift+M
- this.keyHandler.bindAction(88, true, 'insertText', true); // Ctrl+Shift+X
- this.keyHandler.bindAction(75, true, 'insertRectangle'); // Ctrl+K
- this.keyHandler.bindAction(75, true, 'insertEllipse', true); // Ctrl+Shift+K
-
- if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
- {
- this.altShiftActions[83] = 'synchronize'; // Alt+Shift+S
- }
-
+ this.keyHandler.bindAction(67, true, 'copyStyle', true); // Ctrl+Shift+C
+ this.keyHandler.bindAction(86, true, 'pasteStyle', true); // Ctrl+Shift+V
+ this.keyHandler.bindAction(77, true, 'editGeometry', true); // Ctrl+Shift+M
+ this.keyHandler.bindAction(88, true, 'insertText', true); // Ctrl+Shift+X
+ this.keyHandler.bindAction(75, true, 'insertRectangle'); // Ctrl+K
+ this.keyHandler.bindAction(75, true, 'insertEllipse', true); // Ctrl+Shift+K
+ this.altShiftActions[83] = 'synchronize'; // Alt+Shift+S
+
this.installImagePasteHandler();
this.installNativeClipboardHandler();
};
@@ -8878,10 +9011,9 @@
// Installs drag and drop handler for rich text editor
if (Graph.fileSupport)
{
- this.editor.graph.addListener(mxEvent.EDITING_STARTED, mxUtils.bind(this, function(evt)
+ graph.addListener(mxEvent.EDITING_STARTED, mxUtils.bind(this, function(evt)
{
// Setup the dnd listeners
- var graph = this.editor.graph;
var textElt = graph.cellEditor.text2;
var dropElt = null;
diff --git a/src/main/webapp/js/diagramly/GraphViewer.js b/src/main/webapp/js/diagramly/GraphViewer.js
index de014351..379d3835 100644
--- a/src/main/webapp/js/diagramly/GraphViewer.js
+++ b/src/main/webapp/js/diagramly/GraphViewer.js
@@ -46,7 +46,7 @@ GraphViewer.prototype.toolbarZIndex = 999;
/**
* If automatic fit should be enabled if zoom is disabled. Default is true.
*/
-GraphViewer.prototype.autoFit = true;
+GraphViewer.prototype.autoFit = false;
/**
* If the diagram should be centered. Default is false.
@@ -59,6 +59,12 @@ GraphViewer.prototype.center = false;
GraphViewer.prototype.allowZoomIn = false;
/**
+ * Specifies if zooming out for auto fit is allowed. Default is true.
+ * If toolbar-nohide is true then overflow content is visible.
+ */
+GraphViewer.prototype.allowZoomOut = true;
+
+/**
* Whether the title should be shown as a tooltip if the toolbar is disabled.
* Default is false.
*/
@@ -88,6 +94,8 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
this.graphConfig = (graphConfig != null) ? graphConfig : {};
this.autoFit = (this.graphConfig['auto-fit'] != null) ?
this.graphConfig['auto-fit'] : this.autoFit;
+ this.allowZoomOut = (this.graphConfig['allow-zoom-out'] != null) ?
+ this.graphConfig['allow-zoom-out'] : this.allowZoomOut;
this.allowZoomIn = (this.graphConfig['allow-zoom-in'] != null) ?
this.graphConfig['allow-zoom-in'] : this.allowZoomIn;
this.center = (this.graphConfig['center'] != null) ?
@@ -695,8 +703,6 @@ GraphViewer.prototype.addSizeHandler = function()
var positionGraph = mxUtils.bind(this, function(origin)
{
- origin = (origin != null) ? origin : new mxPoint();
-
// Allocates maximum width while setting initial view state
var prev = container.style.minWidth;
@@ -708,7 +714,7 @@ GraphViewer.prototype.addSizeHandler = function()
var maxHeight = (this.graphConfig['max-height'] != null) ? this.graphConfig['max-height'] :
((container.style.height != '' && this.autoFit) ? container.offsetHeight : undefined);
- if (container.offsetWidth > 0 && (this.allowZoomIn ||
+ if (container.offsetWidth > 0 && origin == null && this.allowZoomOut && (this.allowZoomIn ||
bounds.width + 2 * this.graph.border > container.offsetWidth ||
bounds.height + 2 * this.graph.border > maxHeight))
{
@@ -721,12 +727,14 @@ GraphViewer.prototype.addSizeHandler = function()
this.fitGraph(maxScale);
}
- else if (!this.widthIsEmpty && !(this.graphConfig.resize != false || container.style.height == ''))
+ else if (!this.widthIsEmpty && origin == null && !(this.graphConfig.resize != false || container.style.height == ''))
{
this.graph.center((!this.widthIsEmpty || bounds.width < this.minWidth) && this.graphConfig.resize != true);
}
else
{
+ origin = (origin != null) ? origin : new mxPoint();
+
this.graph.view.setTranslate(Math.floor(this.graph.border - bounds.x / this.graph.view.scale) + origin.x,
Math.floor(this.graph.border - bounds.y / this.graph.view.scale) + origin.y);
lastOffsetWidth = container.offsetWidth;
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 8379bbef..f7251a1d 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -694,7 +694,7 @@
editorUi.actions.addAction('downloadDesktop...', function()
{
- editorUi.openLink('https://get.draw.io/');
+ editorUi.openLink('https://get.diagrams.net/');
});
action = editorUi.actions.addAction('tags...', mxUtils.bind(this, function()
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index 05ee84e5..4ac80f32 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -1952,9 +1952,9 @@ PageSetupDialog.getFormats = function()
{key: 'a7', title: 'A7 (74 mm x 105 mm)', format: new mxRectangle(0, 0, 291, 413)},
{key: 'b4', title: 'B4 (250 mm x 353 mm)', format: new mxRectangle(0, 0, 980, 1390)},
{key: 'b5', title: 'B5 (176 mm x 250 mm)', format: new mxRectangle(0, 0, 690, 980)},
- {key: '16-9', title: '16:9 (1600 x 900)', format: new mxRectangle(0, 0, 1600, 900)},
- {key: '16-10', title: '16:10 (1920 x 1200)', format: new mxRectangle(0, 0, 1920, 1200)},
- {key: '4-3', title: '4:3 (1600 x 1200)', format: new mxRectangle(0, 0, 1600, 1200)},
+ {key: '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}];
};
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index b309a220..f95f3ff4 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -1195,7 +1195,12 @@ EditorUi.prototype.installShapePicker = function()
{
mxEvent.consume(evt);
var pt = mxUtils.convertPoint(this.container, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
- ui.showShapePicker(pt.x, pt.y);
+
+ // Asynchronous to avoid direct insert after double tap
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ ui.showShapePicker(pt.x, pt.y);
+ }), 30);
}
else
{
@@ -1293,7 +1298,7 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback, direction)
}
else
{
- mxUtils.setPrefixedStyle(div.style, 'transform', 'translate(-4px,-4px)');
+ mxUtils.setPrefixedStyle(div.style, 'transform', 'translate(-22px,-22px)');
}
if (graph.background != null && graph.background != mxConstants.NONE)
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 7febd4ab..512b262e 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -2110,7 +2110,7 @@ function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6=
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),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();
Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,d){var c=null!=d?d.getProperty("edit"):null;null!=c&&c.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(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
@@ -2148,15 +2148,15 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],c=0;c<
-e.length;c++)null!=a.view.getState(e[c])&&k.push(e[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],q=0;q<
+e.length;q++)null!=a.view.getState(e[q])&&k.push(e[q]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,k,l,t,c,f,g,m){var p=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(p=80);e+=p;d+=p;var n=e,v=d,q=mxUtils.getDocumentSize();null!=window.innerHeight&&(q.height=window.innerHeight);var x=q.height,y=Math.max(1,Math.round((q.width-e-64)/2)),D=Math.max(1,Math.round((x-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,x-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));q=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=q.x+"px";this.bg.style.top=q.y+"px";y+=q.x;D+=q.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(f?"geTransDialog":
-"geDialog");k=this.getPosition(y,D,e,d);y=k.x;D=k.y;z.style.width=e+"px";z.style.height=d+"px";z.style.left=y+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(b);document.body.appendChild(z);!c&&b.clientHeight>z.clientHeight-64&&(b.style.overflowY="auto");if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=D+14+"px",l.style.left=y+e+38-p+"px",l.style.zIndex=
-this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(c){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";y=Math.max(1,Math.round((f.width-e-64)/2));D=Math.max(1,
-Math.round((x-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,x-64);f=this.getPosition(y,D,e,d);y=f.x;D=f.y;z.style.left=y+"px";z.style.top=D+"px";z.style.width=e+"px";z.style.height=d+"px";!c&&b.clientHeight>z.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=y+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=
-z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,k,n,u,q,c,f,g){var l=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(l=80);e+=l;d+=l;var m=e,t=d,p=mxUtils.getDocumentSize();null!=window.innerHeight&&(p.height=window.innerHeight);var x=p.height,C=Math.max(1,Math.round((p.width-e-64)/2)),z=Math.max(1,Math.round((x-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,x-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));p=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=p.x+"px";this.bg.style.top=p.y+"px";C+=p.x;z+=p.y;k&&document.body.appendChild(this.bg);var D=a.createDiv(c?"geTransDialog":
+"geDialog");k=this.getPosition(C,z,e,d);C=k.x;z=k.y;D.style.width=e+"px";D.style.height=d+"px";D.style.left=C+"px";D.style.top=z+"px";D.style.zIndex=this.zIndex;D.appendChild(b);document.body.appendChild(D);!q&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=z+14+"px",n.style.left=C+e+38-l+"px",n.style.zIndex=
+this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!g)){var I=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){I=!0}),null,mxUtils.bind(this,function(c){I&&(a.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=f){var c=f();null!=c&&(m=e=c.w,t=d=c.h)}c=mxUtils.getDocumentSize();x=c.height;this.bg.style.height=x+"px";C=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,
+Math.round((x-d-a.footerHeight)/3));e=null!=document.body?Math.min(m,document.body.scrollWidth-64):m;d=Math.min(t,x-64);c=this.getPosition(C,z,e,d);C=c.x;z=c.y;D.style.left=C+"px";D.style.top=z+"px";D.style.width=e+"px";D.style.height=d+"px";!q&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=C+e+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=u;this.container=
+D;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2165,82 +2165,82 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,d,k,l,t,c,f,g,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,b);n.setAttribute("title",b);p.appendChild(n)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;p.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(d,function(){f&&a.hideDialog();null!=k&&k()});
-v.className="geBtn";e.appendChild(v);null!=t&&(d=mxUtils.button(t,function(){f&&a.hideDialog();null!=c&&c()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var f=c.checked||g.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(f){var v=c.checked?1:parseInt(m.value);isNaN(v)||(n=mxUtils.getScaleForPageCount(v,e,b))}e.getGraphBounds();var l=v=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);n*=d;!f&&e.pageVisible?(d=e.getPageLayout(),v-=d.x*b.width,l-=d.y*b.height):
-f=!0;f=PrintDialog.createPrintPreview(e,n,b,0,v,l,f);f.open();a&&PrintDialog.printPreview(f)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var t=document.createElement("tbody");d=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(c);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
-k.appendChild(f);mxEvent.addListener(f,"click",function(a){c.checked=!c.checked;g.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){g.checked=!c.checked});d.appendChild(k);t.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");k.appendChild(f);mxEvent.addListener(f,
-"click",function(a){g.checked=!g.checked;c.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);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";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(m);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);t.appendChild(d);mxEvent.addListener(g,"change",
-function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");c.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";k.appendChild(p);d.appendChild(k);t.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&k.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
-k.appendChild(f);d.appendChild(k);t.appendChild(d);l.appendChild(t);this.container=l};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
-PrintDialog.createPrintPreview=function(a,b,e,d,k,l,t){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=t;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+var ErrorDialog=function(a,b,e,d,k,n,u,q,c,f,g){c=null!=c?c:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="10px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxUtils.write(m,b);m.setAttribute("title",b);l.appendChild(m)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;l.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=g&&g()}),f.className="geBtn",e.appendChild(f));var t=mxUtils.button(d,function(){c&&a.hideDialog();null!=k&&k()});
+t.className="geBtn";e.appendChild(t);null!=u&&(d=mxUtils.button(u,function(){c&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){t.focus()};l.appendChild(e);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,d=parseInt(l.value)/100;isNaN(d)&&(d=1,l.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var t=q.checked?1:parseInt(g.value);isNaN(t)||(m=mxUtils.getScaleForPageCount(t,e,b))}e.getGraphBounds();var n=t=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);m*=d;!c&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*b.width,n-=d.y*b.height):
+c=!0;c=PrintDialog.createPrintPreview(e,m,b,0,t,n,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var u=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
+k.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(k);u.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");k.appendChild(c);mxEvent.addListener(c,
+"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);u.appendChild(d);mxEvent.addListener(f,"change",
+function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";k.appendChild(l);d.appendChild(k);u.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+k.style.paddingTop="20px";k.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&k.appendChild(c);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";k.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";k.appendChild(m);a.editor.cancelFirst||
+k.appendChild(c);d.appendChild(k);u.appendChild(d);n.appendChild(u);this.container=n};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,d,k,n,u){b=new mxPrintPreview(a,b,e,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=u;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function e(){null==v?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(n.setAttribute("title",v.src),n.style.fontSize="11px",n.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
-l,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var c=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");
-l=document.createElement("td");mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var m=d.background;b();mxEvent.addListener(g,"click",function(c){a.pickColor(m||"none",function(a){m=
-a;b()});mxEvent.consume(c)});l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();l.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,
-mxResources.get("image")+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a,c){c||(v=a,e())},v);mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align",
-"right");var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&l.appendChild(q);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(p.value);isNaN(c)||d.gridSize===c||d.setGridSize(c);c=new ChangePageSetup(a,m,v,f.get());c.ignoreColor=d.background==m;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==
-c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||d.model.execute(c)});x.className="geBtn gePrimaryBtn";l.appendChild(x);a.editor.cancelFirst||l.appendChild(q);k.appendChild(l);c.appendChild(k);t.appendChild(c);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||p!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<q.length;d++)b=q[d],z?"custom"==b.key&&(c.value=b.key,z=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(c.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(c.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,a=t.checked=!0));a?(f.style.display="",m.style.display="none"):(p.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
-c.value="custom",f.style.display="none",m.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",b);t.setAttribute("type","radio");t.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
-f.style.height="24px";l.style.marginRight="6px";f.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));f.appendChild(b);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},q=PageSetupDialog.getFormats(),x=0;x<q.length;x++){var y=q[x];v[y.key]=y;var D=document.createElement("option");D.setAttribute("value",y.key);mxUtils.write(D,y.title);c.appendChild(D)}var z=!1;k();a.appendChild(c);mxUtils.br(a);
-a.appendChild(f);a.appendChild(m);var E=e,A=function(a,b){var g=v[c.value];null!=g.format?(p.value=g.format.width/100,n.value=g.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");g=parseFloat(p.value);if(isNaN(g)||0>=g)p.value=e.width/100;g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=c.value&&t.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&z||g.width==E.width&&g.height==E.height||(E=g,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){l.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){t.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(t,"change",A);mxEvent.addListener(l,"change",A);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
-A(a,!0)});A();return{set:function(a){e=a;k(null,null,!0)},get:function(){return E},widthInput:p,heightInput:n}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=g,f.style.backgroundImage="")}function e(){null==t?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(m.setAttribute("title",t.src),m.style.fontSize="11px",m.innerHTML=mxUtils.htmlEntities(t.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+n,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(g||"none",function(a){g=
+a;b()});mxEvent.consume(c)});n.appendChild(f);mxUtils.write(n,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=d.getGridSize();n.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,
+mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,e())},t);mxEvent.consume(c)});e();n.appendChild(m);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align",
+"right");var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&n.appendChild(p);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var f=parseInt(l.value);isNaN(f)||d.gridSize===f||d.setGridSize(f);f=new ChangePageSetup(a,g,t,c.get());f.ignoreColor=d.background==g;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=t?t.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==
+f.previousFormat.height&&f.ignoreColor&&f.ignoreImage||d.model.execute(f)});x.className="geBtn gePrimaryBtn";n.appendChild(x);a.editor.cancelFirst||n.appendChild(p);k.appendChild(n);q.appendChild(k);u.appendChild(q);this.container=u};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,f,d){if(d||l!=document.activeElement&&m!=document.activeElement){a=!1;for(f=0;f<p.length;f++)d=p[f],D?"custom"==d.key&&(q.value=d.key,D=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,u.setAttribute("checked","checked"),u.defaultChecked=!0,a=u.checked=!0));a?(c.style.display="",g.style.display="none"):(l.value=e.width/100,m.value=e.height/100,n.setAttribute("checked","checked"),
+q.value="custom",c.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var u=document.createElement("input");u.setAttribute("name",b);u.setAttribute("type","radio");u.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";
+c.style.height="24px";n.style.marginRight="6px";c.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);u.style.marginLeft="10px";u.style.marginRight="6px";c.appendChild(u);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var l=document.createElement("input");
+l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";g.appendChild(m);mxUtils.write(g," in");c.style.display="none";g.style.display="none";for(var t={},p=PageSetupDialog.getFormats(),x=0;x<p.length;x++){var C=p[x];t[C.key]=C;var z=document.createElement("option");z.setAttribute("value",C.key);mxUtils.write(z,C.title);q.appendChild(z)}var D=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(c);a.appendChild(g);var I=e,y=function(a,f){var b=t[q.value];null!=b.format?(l.value=b.format.width/100,m.value=b.format.height/100,g.style.display="none",c.style.display=""):(c.style.display="none",g.style.display="");b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=e.width/100;b=parseFloat(m.value);if(isNaN(b)||0>=b)m.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&u.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));f&&D||b.width==I.width&&b.height==I.height||(I=b,null!=d&&d(I))};mxEvent.addListener(b,"click",function(a){n.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){u.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",y);mxEvent.addListener(l,"click",y);mxEvent.addListener(m,"blur",y);mxEvent.addListener(m,"click",y);mxEvent.addListener(u,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(q,"change",function(a){D="custom"==q.value;
+y(a,!0)});y();return{set:function(a){e=a;k(null,null,!0)},get:function(){return I},widthInput:l,heightInput:m}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
-{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,d,k,l,t,c,f,g,m,p){f=null!=f?f:!0;var n,v,q=document.createElement("table"),x=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=m?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");n.appendChild(v);var y=document.createElement("input");y.setAttribute("value",b||"");y.style.marginLeft="4px";y.style.width=null!=p?p+
-"px":"180px";var D=mxUtils.button(e,function(){if(null==l||l(y.value))f&&a.hideDialog(),d(y.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==t)if(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=q.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=y,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(y.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
-v.style.whiteSpace="nowrap";v.appendChild(y);n.appendChild(v);if(null!=k||null==t)x.appendChild(n),null!=m&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,y,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",v.appendChild(n),y.style.width=null!=p?p-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,y,m)));null!=t&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),n.appendChild(v),x.appendChild(n));n=
-document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});m.className="geBtn";a.editor.cancelFirst&&v.appendChild(m);null!=c&&(p=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(y,"keypress",function(a){13==a.keyCode&&D.click()});
-v.appendChild(D);a.editor.cancelFirst||v.appendChild(m);n.appendChild(v);x.appendChild(n);q.appendChild(x);this.container=q};FilenameDialog.filenameHelpLink=null;
+{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
+var FilenameDialog=function(a,b,e,d,k,n,u,q,c,f,g,l){c=null!=c?c:!0;var m,t,p=document.createElement("table"),x=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");t=document.createElement("td");t.style.whiteSpace="nowrap";t.style.fontSize="10pt";t.style.width=g?"80px":"120px";mxUtils.write(t,(k||mxResources.get("filename"))+":");m.appendChild(t);var C=document.createElement("input");C.setAttribute("value",b||"");C.style.marginLeft="4px";C.style.width=null!=l?l+
+"px":"180px";var z=mxUtils.button(e,function(){if(null==n||n(C.value))c&&a.hideDialog(),d(C.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==u)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=C,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),z.click());a.stopPropagation();a.preventDefault()}))}}};t=document.createElement("td");
+t.style.whiteSpace="nowrap";t.appendChild(C);m.appendChild(t);if(null!=k||null==u)x.appendChild(m),null!=g&&(null!=a.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(a,C,a.editor.diagramFileTypes),m.style.marginLeft="6px",m.style.width="74px",t.appendChild(m),C.style.width=null!=l?l-40+"px":"140px"),t.appendChild(FilenameDialog.createTypeHint(a,C,g)));null!=u&&(m=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(u),m.appendChild(t),x.appendChild(m));m=
+document.createElement("tr");t=document.createElement("td");t.colSpan=2;t.style.paddingTop="20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});g.className="geBtn";a.editor.cancelFirst&&t.appendChild(g);null!=q&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(q)}),l.className="geBtn",t.appendChild(l));mxEvent.addListener(C,"keypress",function(a){13==a.keyCode&&z.click()});
+t.appendChild(z);a.editor.cancelFirst||t.appendChild(g);m.appendChild(t);x.appendChild(m);p.appendChild(x);this.container=p};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,b,e){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",k);mxEvent.addListener(b,"change",k);mxEvent.addListener(d,"click",function(b){var e=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(b)});k();return d};
FilenameDialog.createFileTypes=function(a,b,e){var d=document.createElement("select");for(a=0;a<e.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(e[a].description)+" (."+e[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=e[d.value].extension;var k=b.value.lastIndexOf(".");0<k?(a=e[d.value].extension,b.value=b.value.substring(0,k+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),c=0;c<e.length;c++)if(k==e[c].extension){a=c;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=a.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
-mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),f.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
-mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,f=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",d="none",b="";if(a.isGridEnabled()){b=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(f))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",b=a.gridSize*this.scale*this.gridSteps):
-d="url("+this.gridImage+")";var e=f=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),f=1+e.x,e=1+e.y);b=-Math.round(b-mxUtils.mod(this.translate.x*this.scale-f,b))+"px "+-Math.round(b-mxUtils.mod(this.translate.y*this.scale-e,b))+"px"}f=a.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=b,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
-c,a.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(a.container.className="geDiagramContainer",f.style.backgroundPosition=b,f.style.backgroundColor=c,f.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var f=this.gridSteps*c,d=[],b=1;b<this.gridSteps;b++){var e=b*c;d.push("M 0 "+e+" L "+f+" "+e+" M "+e+" 0 L "+e+" "+f)}return'<svg width="'+
-f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=
-this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var b=this.gridSize*this.view.scale*this.view.gridSteps,b=-Math.round(b-mxUtils.mod(this.view.translate.x*this.view.scale+d,b))+"px "+-Math.round(b-mxUtils.mod(this.view.translate.y*this.view.scale+c,b))+"px";f.style.backgroundPosition=b}};mxGraph.prototype.updatePageBreaks=function(a,c,f){var d=this.view.scale,b=this.view.translate,e=this.pageFormat,n=d*this.pageScale,v=this.view.getBackgroundPageBounds();c=v.width;f=v.height;var q=
-new mxRectangle(d*b.x,d*b.y,e.width*n,e.height*n),k=(a=a&&Math.min(q.width,q.height)>this.minPageBreakDist)?Math.ceil(f/q.height)-1:0,l=a?Math.ceil(c/q.width)-1:0,t=v.x+c,z=v.y+f;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:l,f=0;f<=c;f++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(v.x),Math.round(v.y+(f+1)*q.height)),
-new mxPoint(Math.round(t),Math.round(v.y+(f+1)*q.height))]:[new mxPoint(Math.round(v.x+(f+1)*q.width),Math.round(v.y)),new mxPoint(Math.round(v.x+(f+1)*q.width),Math.round(z))];null!=a[f]?(a[f].points=d,a[f].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[f]=d)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){for(var d=0;d<c.length;d++){if(this.graph.isTableCell(c[d])||this.graph.isTableRow(c[d]))return!1;if(this.graph.getModel().isVertex(c[d])){var e=this.graph.getCellGeometry(c[d]);if(null!=e&&e.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);
-a.intersects=mxUtils.bind(this,function(c,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,f=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,b=this.graph.pageScale,
-e=d.width*b,d=d.height*b,b=Math.floor(Math.min(0,c)/e),n=Math.floor(Math.min(0,f)/d);return new mxRectangle(this.scale*(this.translate.x+b*e),this.scale*(this.translate.y+n*d),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-b)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/d)-n)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
-mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,d,b,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,c,f){var d,b=this.graph.model.getParent(a);
-if(c)d=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(b)&&!this.graph.isSiblingSelected(a)&&(null!=d&&d.relative||!this.graph.isContainer(b)||this.graph.isPart(a));else if(d=l.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=b,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(f.getEvent())||this.graph.isCellSelected(a)&&
-!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(b);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),f=c.getParent(a),d=this.graph.view.getState(f),b=this.graph.isCellSelected(a);null!=d&&(c.isVertex(f)||c.isEdge(f));){var e=this.graph.isCellSelected(f),b=b||e;if(e||!b&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=f;f=c.getParent(f)}return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
+a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),n=0;n<e.length;n++)if(k==e[n].extension){a=n;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
+mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
+mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,d=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",f="none",b="";if(a.isGridEnabled()){b=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",b=a.gridSize*this.scale*this.gridSteps):
+f="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);b=-Math.round(b-mxUtils.mod(this.translate.x*this.scale-c,b))+"px "+-Math.round(b-mxUtils.mod(this.translate.y*this.scale-e,b))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=b,a.view.backgroundPageShape.node.style.backgroundImage=f,a.view.backgroundPageShape.node.style.backgroundColor=
+d,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=b,c.style.backgroundColor=d,c.style.backgroundImage=f)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,f=[],b=1;b<this.gridSteps;b++){var e=b*d;f.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+f.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var f=this.view.scale,b=this.view.translate,e=this.pageFormat,m=f*this.pageScale,t=this.view.getBackgroundPageBounds();d=t.width;c=t.height;var p=
+new mxRectangle(f*b.x,f*b.y,e.width*m,e.height*m),x=(a=a&&Math.min(p.width,p.height)>this.minPageBreakDist)?Math.ceil(c/p.height)-1:0,k=a?Math.ceil(d/p.width)-1:0,n=t.x+d,q=t.y+c;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:k,d=0;d<=c;d++){var f=a==this.horizontalPageBreaks?[new mxPoint(Math.round(t.x),Math.round(t.y+(d+1)*p.height)),
+new mxPoint(Math.round(n),Math.round(t.y+(d+1)*p.height))]:[new mxPoint(Math.round(t.x+(d+1)*p.width),Math.round(t.y)),new mxPoint(Math.round(t.x+(d+1)*p.width),Math.round(q))];null!=a[d]?(a[d].points=f,a[d].redraw()):(f=new mxPolyline(f,this.pageBreakColor),f.dialect=this.dialect,f.isDashed=this.pageBreakDashed,f.pointerEvents=!1,f.init(this.view.backgroundPane),f.redraw(),a[d]=f)}for(d=c;d<a.length;d++)a[d].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++){if(this.graph.isTableCell(d[f])||this.graph.isTableRow(d[f]))return!1;if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);
+a.intersects=mxUtils.bind(this,function(d,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,f=this.graph.pageFormat,b=this.graph.pageScale,
+e=f.width*b,f=f.height*b,b=Math.floor(Math.min(0,d)/e),m=Math.floor(Math.min(0,c)/f);return new mxRectangle(this.scale*(this.translate.x+b*e),this.scale*(this.translate.y+m*f),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-b)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/f)-m)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
+mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,d,c,f,b,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,d,c){var f,b=this.graph.model.getParent(a);
+if(d)f=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),f=!this.graph.model.isEdge(b)&&!this.graph.isSiblingSelected(a)&&(null!=f&&f.relative||!this.graph.isContainer(b)||this.graph.isPart(a));else if(f=n.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))f=b,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(c.getEvent())||this.graph.isCellSelected(a)&&
+!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(b);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a),f=this.graph.view.getState(c),b=this.graph.isCellSelected(a);null!=f&&(d.isVertex(c)||d.isEdge(c));){var e=this.graph.isCellSelected(c),b=b||e;if(e||!b&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=d.getParent(c)}return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=
k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var l=d.graphHandler.start;d.graphHandler.start=function(){null!=y.hoverIcons&&y.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var t=!1,c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,f){return t||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(t=!0,this.hoverIcons.reset(),
-d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";t=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return f.apply(this,arguments)||t||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var m=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return t||m.apply(this,arguments)};var p=!1,n=null,v=null,q=null,x=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&p!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var b=0;b<q.length;b++)this.toolbar.container.appendChild(q[b]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=v}p=d.cellEditor.isContentEditing();
-n=a;v=f;q=c}}),y=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);x();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=y.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));y.toolbar.setFontName(f);
-y.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{z.apply(this,arguments),x()}catch(B){y.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
-window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var E=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();E.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
-function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),C="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=
-d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var p=m[e],u=p.indexOf("=");if(0<=u){g=p.substring(0,u);var n=p.substring(u+1);null!=b[g]&&"none"==n&&(a.push(n),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
-f,"values",a,"cells",[c.cell]))}}catch(W){this.handleError(W)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(b=0;b<I[a].length;b++)A.push(I[a][b]);for(a=0;a<C.length;a++)0>mxUtils.indexOf(A,C[a])&&A.push(C[a]);var K=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),p=null!=m?m.split(";"):[];e=A.slice();for(var u=0;u<p.length;u++){var n=p[u],B=n.indexOf("=");if(0<=B){var q=
-n.substring(0,B),v=mxUtils.indexOf(e,q);0<=v&&e.splice(v,1);for(var k=0;k<I.length;k++){var l=I[k];if(0<=mxUtils.indexOf(l,q))for(var x=0;x<l.length;x++){var J=mxUtils.indexOf(e,l[x]);0<=J&&e.splice(J,1)}}}}}for(var y=f.isEdge(g),t=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),u=0;u<e.length;u++){var q=e[u],z=t[q];null==z||"shape"==q&&!y||y&&!(0>mxUtils.indexOf(C,q))||(D=mxUtils.setStyle(D,q,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
-d.addListener("textInserted",function(a,c){K(c.getProperty("cells"),!0)});this.insertHandler=K;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));K(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
-c.getProperty("keys"),m=c.getProperty("values"),e=0;e<f.length;e++){var p=0<=mxUtils.indexOf(G,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(C,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||p)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
-m[e];if(g||p||0<=mxUtils.indexOf(F,f[e]))null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var n=d.graphHandler.start;d.graphHandler.start=function(){null!=C.hoverIcons&&C.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return u||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),
+d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var c=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return c.apply(this,arguments)||u||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var f=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return f.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var g=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return u||g.apply(this,arguments)};var l=!1,m=null,t=null,p=null,x=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var b=0;b<p.length;b++)this.toolbar.container.appendChild(p[b]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=t}l=d.cellEditor.isContentEditing();
+m=a;t=f;p=c}}),C=this,z=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){z.apply(this,arguments);x();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=C.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));C.toolbar.setFontName(f);
+C.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var D=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),x()}catch(A){C.handleError(A)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(v){}var I=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();I.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
+function(){return keyHandler};var y="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),B="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=
+d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var l=m[e],v=l.indexOf("=");if(0<=v){g=l.substring(0,v);var p=l.substring(v+1);null!=b[g]&&"none"==p&&(a.push(p),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
+f,"values",a,"cells",[c.cell]))}}catch(da){this.handleError(da)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),H=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
+["strokeColor","strokeWidth"],["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)y.push(H[a][b]);for(a=0;a<B.length;a++)0>mxUtils.indexOf(y,B[a])&&y.push(B[a]);var G=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),l=null!=m?m.split(";"):[];e=y.slice();for(var v=0;v<l.length;v++){var A=l[v],p=A.indexOf("=");if(0<=p){var t=
+A.substring(0,p),x=mxUtils.indexOf(e,t);0<=x&&e.splice(x,1);for(var k=0;k<H.length;k++){var n=H[k];if(0<=mxUtils.indexOf(n,t))for(var K=0;K<n.length;K++){var z=mxUtils.indexOf(e,n[K]);0<=z&&e.splice(z,1)}}}}}for(var q=f.isEdge(g),C=q?d.currentEdgeStyle:d.currentVertexStyle,u=f.getStyle(g),v=0;v<e.length;v++){var t=e[v],D=C[t];null==D||"shape"==t&&!q||q&&!(0>mxUtils.indexOf(B,t))||(u=mxUtils.setStyle(u,t,D))}f.setStyle(g,u)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});
+d.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});this.insertHandler=G;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));G(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
+c.getProperty("keys"),m=c.getProperty("values"),e=0;e<f.length;e++){var l=0<=mxUtils.indexOf(E,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(B,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(y,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(y,f[e])){if(b||l)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
+m[e];if(g||l||0<=mxUtils.indexOf(F,f[e]))null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||
@@ -2252,16 +2252,16 @@ EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;Edi
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){"mouseDown"==c.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var e=
-a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var d=a.dblClick;a.dblClick=function(a,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));b.showShapePicker(f.x,f.y)}};if(null!=this.hoverIcons){var k=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();
-k.apply(this,arguments)};var l=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,f){var g=f.getEvent();mxEvent.isControlDown(g)||mxEvent.isShiftDown(g)?l.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,e,n){g=a.getCompositeParent(d.cell);e=a.getCellGeometry(g);for(f.consume();null!=g&&a.model.isVertex(g)&&null!=e&&e.relative;)cell=g,g=a.model.getParent(cell),e=a.getCellGeometry(g);b.showShapePicker(f.getGraphX(),
-f.getGraphY(),g,mxUtils.bind(this,function(a){n(a)}),c)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,b,e,d,k){var l=this.getCellsForShapePicker(e);if(null!=l&&0<l.length){var t=this,c=this.editor.graph,f=document.createElement("div"),g=c.view.getState(e),m=null==e||null!=g&&c.isTransparentState(g)?null:c.copyStyle(e);f.className="geToolbarContainer geSidebarContainer geSidebar";f.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";
-k==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-100%)"):k==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)"):k==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(f.style,"transform","translate(-100%,-50%)"):k==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(f.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(f.style,"transform","translate(-4px,-4px)");null!=c.background&&c.background!=mxConstants.NONE&&
-(f.style.backgroundColor=c.background);c.container.appendChild(f);e=mxUtils.bind(this,function(g){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m?this.sidebar.graph.pasteStyle(m,[g]):t.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,e,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(e,"click",function(){var f=c.cloneCell(g);if(null!=d)d(f);else{f.geometry.x=c.snap(Math.round(a/c.view.scale)-c.view.translate.x-g.geometry.width/2);f.geometry.y=c.snap(Math.round(b/c.view.scale)-c.view.translate.y-g.geometry.height/2);c.model.beginUpdate();try{c.addCell(f)}finally{c.model.endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(f);c.startEditingAtCell(f);null!=t.hoverIcons&&t.hoverIcons.update(c.view.getState(f))}t.hideShapePicker()})});for(k=0;k<l.length;k++)e(l[k]);
-null!=t.hoverIcons&&t.hoverIcons.reset();c.popupMenuHandler.hideMenu();c.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=f}};
-EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,d,b,l){return this.editor.graph.createVertex(null,null,l||"",0,0,d||120,b||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;",120,80),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){"mouseDown"==d.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var e=
+a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var d=a.dblClick;a.dblClick=function(a,e){if(this.isEnabled())if(null!=e||null==b.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(c.x,c.y)}),30)}};if(null!=this.hoverIcons){var k=this.hoverIcons.drag;
+this.hoverIcons.drag=function(){b.hideShapePicker();k.apply(this,arguments)};var n=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,c){var f=c.getEvent();mxEvent.isControlDown(f)||mxEvent.isShiftDown(f)?n.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){f=a.getCompositeParent(d.cell);l=a.getCellGeometry(f);for(c.consume();null!=f&&a.model.isVertex(f)&&null!=l&&l.relative;)cell=f,f=a.model.getParent(cell),
+l=a.getCellGeometry(f);b.showShapePicker(c.getGraphX(),c.getGraphY(),f,mxUtils.bind(this,function(a){m(a)}),e)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,f,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,b,e,d,k){var n=this.getCellsForShapePicker(e);if(null!=n&&0<n.length){var u=this,q=this.editor.graph,c=document.createElement("div"),f=q.view.getState(e),g=null==e||null!=f&&q.isTransparentState(f)?null:q.copyStyle(e);c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";
+k==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,-100%)"):k==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)"):k==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(c.style,"transform","translate(-100%,-50%)"):k==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(c.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=
+mxConstants.NONE&&(c.style.backgroundColor=q.background);q.container.appendChild(c);e=mxUtils.bind(this,function(f){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";c.appendChild(e);null!=g?this.sidebar.graph.pasteStyle(g,[f]):u.insertHandler([f],""!=f.value,this.sidebar.graph.model);this.sidebar.createThumb([f],25,25,e,null,!0,!1,f.geometry.width,
+f.geometry.height);mxEvent.addListener(e,"click",function(){var c=q.cloneCell(f);if(null!=d)d(c);else{c.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-f.geometry.width/2);c.geometry.y=q.snap(Math.round(b/q.view.scale)-q.view.translate.y-f.geometry.height/2);q.model.beginUpdate();try{q.addCell(c)}finally{q.model.endUpdate()}q.setSelectionCell(c);q.scrollCellToVisible(c);q.startEditingAtCell(c);null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(c))}u.hideShapePicker()})});for(k=
+0;k<n.length;k++)e(n[k]);null!=u.hoverIcons&&u.hoverIcons.reset();q.popupMenuHandler.hideMenu();q.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=c}};
+EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,d,b,n){return this.editor.graph.createVertex(null,null,n||"",0,0,d||120,b||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;",120,80),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),b("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
80,100),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),b("shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80)]};
EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9!=a.which||!b.isEnabled()||mxEvent.isAltDown(a)||b.isEditing()&&mxEvent.isShiftDown(a)||(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
@@ -2272,41 +2272,41 @@ EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?n
e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==
e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),c={},f=d.createCellLookup(b),g=d.cloneCells(b,null,c),e=new mxGraphModel,p=e.getChildAt(e.getRoot(),
-0),n=0;n<g.length;n++){e.add(p,g[n]);var v=d.view.getState(b[n]);if(null!=v){var q=d.getCellGeometry(g[n]);null!=q&&q.relative&&!e.isEdge(b[n])&&null==f[mxObjectIdentity.get(e.getParent(b[n]))]&&(q.offset=null,q.relative=!1,q.x=v.x/v.view.scale-v.view.translate.x,q.y=v.y/v.view.scale-v.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(c,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),e={},c=d.createCellLookup(b),f=d.cloneCells(b,null,e),g=new mxGraphModel,l=g.getChildAt(g.getRoot(),
+0),m=0;m<f.length;m++){g.add(l,f[m]);var t=d.view.getState(b[m]);if(null!=t){var p=d.getCellGeometry(f[m]);null!=p&&p.relative&&!g.isEdge(b[m])&&null==c[mxObjectIdentity.get(g.getParent(b[m]))]&&(p.offset=null,p.relative=!1,p.x=t.x/t.view.scale-t.view.translate.x,p.y=t.y/t.view.scale-t.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(e,c),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.apply(this,arguments);a.updatePasteActionStates();return b};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,b){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),m=a.view.translate,p=a.view.scale,n=mxRectangle.fromRectangle(g);
-n.x=n.x/p-m.x;n.y=n.y/p-m.y;n.width/=p;n.height/=p;var m=a.container.scrollTop,u=a.container.scrollLeft,B=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)B+=3;var q=a.container.offsetWidth-B,B=a.container.offsetHeight-B;c=c?Math.max(.3,Math.min(f||1,q/n.width)):p;f=(q-c*n.width)/2/c;var v=0==this.lightboxVerticalDivider?0:(B-c*n.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),v=Math.max(v,0));if(e||g.width<q||g.height<B)a.view.scaleAndTranslate(c,
-Math.floor(f-n.x),Math.floor(v-n.y)),a.container.scrollTop=m*c/p,a.container.scrollLeft=u*c/p;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/p),Math.floor(g.y+b/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),m=a.view.translate,l=a.view.scale,v=mxRectangle.fromRectangle(e);
+v.x=v.x/l-m.x;v.y=v.y/l-m.y;v.width/=l;v.height/=l;var m=a.container.scrollTop,p=a.container.scrollLeft,A=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)A+=3;var t=a.container.offsetWidth-A,A=a.container.offsetHeight-A;c=c?Math.max(.3,Math.min(f||1,t/v.width)):l;f=(t-c*v.width)/2/c;var x=0==this.lightboxVerticalDivider?0:(A-c*v.height)/this.lightboxVerticalDivider/c;g&&(f=Math.max(f,0),x=Math.max(x,0));if(g||e.width<t||e.height<A)a.view.scaleAndTranslate(c,
+Math.floor(f-v.x),Math.floor(x-v.y)),a.container.scrollTop=m*c/l,a.container.scrollLeft=p*c/l;else if(0!=d||0!=b)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+d/l),Math.floor(e.y+b/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var l=mxUtils.bind(this,function(){var c=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",l);l();var t=0,l=mxUtils.bind(this,function(a,c,f){t++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title",
-f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&l(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var c=l(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
-f=document.createElement("div");f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=l(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,
-mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",
-m)}l(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var n=null,v=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display=
-"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=l(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
+this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var c=
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var u=0,n=mxUtils.bind(this,function(a,c,f){u++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title",
+f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&n(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var q=n(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
+c=document.createElement("div");c.style.display="inline-block";c.style.verticalAlign="top";c.style.fontFamily="Helvetica,Arial";c.style.marginTop="8px";c.style.fontSize="14px";c.style.color="#ffffff";this.chromelessToolbar.appendChild(c);var f=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(c.innerHTML="",mxUtils.write(c,
+mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",q.style.display="",c.style.display="inline-block"):(f.style.display="none",q.style.display="none",c.style.display="none");g()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",
+g)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
+mxResources.get("fit"));var m=null,t=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),m=null);null!=t&&(window.clearTimeout(t),t=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),m=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display=
+"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(l);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||l(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
-a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var z=this.lightboxToolbarActions[p];l(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&l(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
-window.self!==window.top&&l(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&l(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?q():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
-f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,u=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
-"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform="",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,m=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=u&&(g+=c.x-u.x,m+=c.y-u.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",
-J);a.cumulativeZoomFactor=1;J=K=u=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
-20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));
-u=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
-(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
-"0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d,b,g){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),g=40/a.view.scale,mxEvent.isShiftDown(c)?
-a.view.setTranslate(b.x+(f?-g:g),b.y):a.view.setTranslate(b.x,b.y+(f?g:-g));else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=null!=b&&null!=g?new mxPoint(b,g):new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
+this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){C.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
+a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(l=0;l<this.lightboxToolbarActions.length;l++){var D=this.lightboxToolbarActions[l];n(D.fn,D.icon,D.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
+window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var I=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<I&&Math.abs(this.scrollTop-a.container.scrollTop)<I&&Math.abs(this.startX-f.getGraphX())<I&&Math.abs(this.startY-f.getGraphY())<I&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?p():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=
+a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}y.apply(this,arguments)};if(!a.isViewer()){var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
+f.x+c.width*d.width),e=Math.ceil(2*f.y+c.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=b||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,b,e);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?B.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
+d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var E=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var H=null,G=null,v=null,K=null,A=function(c){null!=H&&window.clearTimeout(H);window.setTimeout(function(){a.isMouseDown||(H=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
+"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",E.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",E.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";E.style.transform=""},0)):(F.style.transform="",E.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
+f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=G&&(g=a.container.offsetWidth/2-G.x+f.x,m=a.container.offsetHeight/2-G.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,m+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=K&&F.setAttribute("filter",
+K);a.cumulativeZoomFactor=1;K=G=v=H=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(G=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
+20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=F.getAttribute("filter")&&(K=F.getAttribute("filter"),F.removeAttribute("filter"));
+v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:G.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:G.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";E.style.transformOrigin=c+"px "+b+"px";E.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
+(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":G.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":G.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
+"0";null!=e.hoverIcons&&e.hoverIcons.reset()}A(d)};mxEvent.addGestureListeners(a.container,function(a){null!=H&&window.clearTimeout(H)},null,function(c){1!=a.cumulativeZoomFactor&&A(0)});mxEvent.addListener(a.container,"scroll",function(){H&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&A(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d,b,e){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(c)?
+a.view.setTranslate(b.x+(f?-e:e),b.y):a.view.setTranslate(b.x,b.y+(f?e:-e));else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),G=null!=b&&null!=e?new mxPoint(b,e):new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
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")))};
@@ -2329,21 +2329,21 @@ this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.e
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,c){l.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=!1,l=a.getSelectionCells();if(null!=l)for(var t=0;t<l.length;t++){var c=l[t];a.getModel().isEdge(c)&&(k=!0);a.getModel().isVertex(c)&&(e=!0,0<a.getModel().getChildCount(c)||a.isContainer(c))&&(d=!0);if(k&&e)break}l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(t=
-0;t<l.length;t++)this.actions.get(l[t]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);k=e&&1==
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=!1,n=a.getSelectionCells();if(null!=n)for(var u=0;u<n.length;u++){var q=n[u];a.getModel().isEdge(q)&&(k=!0);a.getModel().isVertex(q)&&(e=!0,0<a.getModel().getChildCount(q)||a.isContainer(q))&&(d=!0);if(k&&e)break}n="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(u=
+0;u<n.length;u++)this.actions.get(n[u]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);k=e&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||k&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(k&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));
this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&
null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);
this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),t=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",t+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",t+=this.toolbarHeight);0<t&&!mxClient.IS_QUIRKS&&(t+=1);var c=0;if(null!=this.sidebarFooterContainer){var f=
-this.footerHeight+k,c=Math.max(0,Math.min(d-t-f,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=c+"px";this.sidebarFooterContainer.style.bottom=f+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=t+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=t+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
-m=null!=this.hsplit.parentNode?l+this.splitSize:0;this.diagramContainer.style.left=m+g.x+"px";this.diagramContainer.style.top=t+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=m+"px");b?(this.menubarContainer.style.width=e+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-c+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-f)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",c-=this.tabContainer.clientHeight),this.diagramContainer.style.height=c+"px",this.hsplit.style.height=c+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=f+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+c+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),u=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",u+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",u+=this.toolbarHeight);0<u&&!mxClient.IS_QUIRKS&&(u+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
+this.footerHeight+k,q=Math.max(0,Math.min(d-u-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=u+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=u+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";var f=this.getDiagramContainerOffset(),
+g=null!=this.hsplit.parentNode?n+this.splitSize:0;this.diagramContainer.style.left=g+f.x+"px";this.diagramContainer.style.top=u+f.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=g+"px");b?(this.menubarContainer.style.width=e+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-n-this.splitSize-c)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+q+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2352,13 +2352,13 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=t){var n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,c+(b?n.x-t.x:t.y-n.y)-e));mxEvent.consume(a);c!=m()&&(f=!0,g=null)}}function l(a){k(a);t=c=null}var t=null,c=null,f=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){t=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));c=m();f=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!f&&this.hsplitClickEnabled){var c=null!=g?g-e:0;g=m();d(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
-EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,l,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,d,k,l,t,c,f,g,m,p,n){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,l,t,p,c,f);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,m||100+20*b,!0,!1,n);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,l,t,c,f,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,t,c,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=u){var m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?m.x-u.x:u.y-m.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function n(a){k(a);u=q=null}var u=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){u=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!c&&this.hsplitClickEnabled){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
+EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,n,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(a,b,e,d,k,n,u,q,c,f,g,l,m){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,n,u,l,q,c);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,f||340,g||100+20*b,!0,!1,m);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,n,u,q,c,f){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,n,u,q,c,f);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,d=[],k=0;k<b.length;k++){var l=a.isTableCell(b[k])?a.model.getParent(b[k]):b[k];null==l||e.get(l)||(e.put(l,!0),d.push(l))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,d=[],k=0;k<b.length;k++){var n=a.isTableCell(b[k])?a.model.getParent(b[k]):b[k];null==n||e.get(n)||(e.put(n,!0),d.push(n))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(u){this.handleError(u)}};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
@@ -2366,19 +2366,19 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var t=new Image;t.onload=function(){e(l,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var u=new Image;u.onload=function(){e(n,u.width,u.height)};u.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};u.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,f,b){t.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(f=null!=f?f:1,b){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),g=0;g<c.length;g++)if(d.getModel().isVertex(c[g])&&d.isCellResizable(c[g])){var e=d.getCellGeometry(c[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-f):38==a?e.height=Math.max(0,e.height-f):39==a?e.width+=f:40==a&&(e.height+=f),d.getModel().setGeometry(c[g],e))}}finally{d.getModel().endUpdate()}}else{var m=
-d.getSelectionCell(),e=d.model.getParent(m),c=null;1==d.getSelectionCount()&&d.model.isVertex(m)&&null!=d.layoutManager&&!d.isCellLocked(m)&&(c=d.layoutManager.getLayout(e));if(null!=c&&c.constructor==mxStackLayout)c=e.getIndex(m),37==a||38==a?d.model.add(e,m,Math.max(0,c-1)):39!=a&&40!=a||d.model.add(e,m,Math.min(d.model.getChildCount(e),c+1));else{c=d.getMovableCells(d.getSelectionCells());m=[];for(g=0;g<c.length;g++)e=d.getCurrentCellStyle(c[g]),"1"==mxUtils.getValue(e,"part","0")?(e=d.model.getParent(c[g]),
-d.model.isVertex(e)&&0>mxUtils.indexOf(c,e)&&m.push(e)):m.push(c[g]);0<m.length&&(c=e=0,37==a?e=-f:38==a?c=-f:39==a?e=f:40==a&&(c=f),d.moveCells(m,e,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<t.length){d.getModel().beginUpdate();try{for(var a=0;a<t.length;a++)t[a]();t=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var t=[],c=
-null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
-function(){d.selectChildCell()};if(null!=f[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),f[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var m=this,p=k.escape;k.escape=function(a){p.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
-k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){m.ctrlEnter()}),k.bindAction(8,!1,"delete"),
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,f){u.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,f){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),e=0;e<b.length;e++)if(d.getModel().isVertex(b[e])&&d.isCellResizable(b[e])){var g=d.getCellGeometry(b[e]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),d.getModel().setGeometry(b[e],g))}}finally{d.getModel().endUpdate()}}else{var m=
+d.getSelectionCell(),g=d.model.getParent(m),b=null;1==d.getSelectionCount()&&d.model.isVertex(m)&&null!=d.layoutManager&&!d.isCellLocked(m)&&(b=d.layoutManager.getLayout(g));if(null!=b&&b.constructor==mxStackLayout)b=g.getIndex(m),37==a||38==a?d.model.add(g,m,Math.max(0,b-1)):39!=a&&40!=a||d.model.add(g,m,Math.min(d.model.getChildCount(g),b+1));else{b=d.getMovableCells(d.getSelectionCells());m=[];for(e=0;e<b.length;e++)g=d.getCurrentCellStyle(b[e]),"1"==mxUtils.getValue(g,"part","0")?(g=d.model.getParent(b[e]),
+d.model.isVertex(g)&&0>mxUtils.indexOf(b,g)&&m.push(g)):m.push(b[e]);0<m.length&&(b=g=0,37==a?g=-c:38==a?b=-c:39==a?g=c:40==a&&(b=c),d.moveCells(m,g,b))}}});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<u.length){d.getModel().beginUpdate();try{for(var a=0;a<u.length;a++)u[a]();u=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var u=[],q=
+null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
+function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var f=d.connectVertex(d.getSelectionCell(),c[a.keyCode],d.defaultEdgeLength,a,!0);null!=f&&0<f.length&&(1==f.length&&d.model.isEdge(f[0])?d.setSelectionCell(d.model.getTerminal(f[0],!1)):d.setSelectionCell(f[f.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
+function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var g=this,l=k.escape;k.escape=function(a){l.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
+k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){g.ctrlEnter()}),k.bindAction(8,!1,"delete"),
k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,
!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),
k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindAction(9,!1,"indent",!0),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
@@ -2389,34 +2389,34 @@ Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(
mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};
-Graph=function(a,b,e,d,k,l){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=l?l:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,c=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(t=new mxPoint(b.getGraphX(),b.getGraphY()),m=this.isCellSelected(e.cell),f=e,c=b,null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var u=this.selectionCellsHandler.getHandler(e.cell);null!=u&&null!=u.bends&&0<u.bends.length&&(g=u.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(u=this.selectionCellsHandler.getHandler(e.cell),null==u||null==u.getHandleForEvent(b))){var p=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);p.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var n=this.model.getParent(e.cell),u=this.model.getParent(n);if(!this.isCellSelected(u)&&(mxUtils.intersects(p,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(u,0)!=n||mxUtils.intersects(p,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(p,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(p,new mxRectangle(e.x+e.width-
-2,e.y,2,e.height)))&&(n=this.selectionCellsHandler.isHandled(u),this.selectCellForEvent(u,b.getEvent()),u=this.selectionCellsHandler.getHandler(u),null!=u)){var B=u.getHandleForEvent(b);null!=B&&(u.start(b.getGraphX(),b.getGraphY(),B),u.blockDelayedSelection=!n,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(u=this.getActualStartSize(e.cell),n=this.view.scale,(0<u.x||0<u.width)&&mxUtils.intersects(p,
-new mxRectangle(e.x+(u.x-u.width-1)*n+(0==u.x?e.width:0),e.y,1,e.height))||(0<u.y||0<u.height)&&mxUtils.intersects(p,new mxRectangle(e.x,e.y+(u.y-u.height-1)*n+(0==u.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),u=this.selectionCellsHandler.getHandler(e.cell),null!=u&&(B=mxEvent.CUSTOM_HANDLE-u.customHandles.length+1,u.start(b.getGraphX(),b.getGraphY(),B),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
-mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=t&&null!=f&&null!=c){if(b=f,Math.abs(t.x-d.getGraphX())>e||Math.abs(t.y-d.getGraphY())>e){var u=this.selectionCellsHandler.getHandler(b.cell);null==u&&this.model.isEdge(b.cell)&&(u=this.createHandler(b));if(null!=u&&null!=u.bends&&0<u.bends.length){e=u.getHandleForEvent(c);
-var p=this.view.getEdgeStyle(b),n=p==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(e=g);if(n&&0!=e&&e!=u.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!n||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==u.bends.length-1||null!=b.visibleTargetState)n||e==mxEvent.LABEL_HANDLE||(n=b.absolutePoints,null!=n&&(null==p&&null==e||p==mxEdgeStyle.OrthConnector)&&(e=g,null==e&&(e=new mxRectangle(t.x,
-t.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,n[0].x,n[0].y)?e=0:mxUtils.contains(e,n[n.length-1].x,n[n.length-1].y)?e=u.bends.length-1:null!=p&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,t.x,t.y),e=null==p?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),u.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
-u&&(this.selectionCellsHandler.isHandlerActive(u)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,u),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||u.destroy());m=!1;t=c=f=g=null}}else if(b=d.getState(),null!=b){u=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),n=b.absolutePoints,null!=n)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
-d.getGraphX(),d.getGraphY()))u="move";else if(mxUtils.contains(e,n[0].x,n[0].y)||mxUtils.contains(e,n[n.length-1].x,n[n.length-1].y))u="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),u="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<n.length-1&&0<=e&&(u=0==Math.round(n[e].x-n[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
-1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(n=this.model.getParent(b.cell),p=this.model.getParent(n),!this.isCellSelected(p)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(n,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))u="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(e,new mxRectangle(b.x,
-b.y+b.height-2,b.width,3)))u="row-resize";for(n=b;null==u&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var p=this.getActualStartSize(n.cell),B=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(e,new mxRectangle(n.x+(p.x-p.width-1)*B+(0==p.x?n.width*B:0),n.y,1,n.height))?u="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(e,new mxRectangle(n.x,n.y+(p.y-p.height-1)*B+(0==p.y?n.height:0),n.width,1))&&(u="row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=
-u&&b.setCursor(u)}}),mouseUp:mxUtils.bind(this,function(a,b){g=t=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
-this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=p.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,
-b=this.graph.pageScale,d=f.width*b,f=f.height*b,b=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*d+b.x)*e,(g.y*f+b.y)*e,d*e,f*e));for(m=1;m<g.height;m++)c.push(new mxRectangle((g.x*d+b.x)*e,((g.y+m)*f+b.y)*e,d*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
-function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=n.apply(this,arguments),f=new mxDictionary,b=[],d=0;d<c.length;d++){var e=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&
-this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==e||f.get(e)||(f.put(e,!0),b.push(e))}return b};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);
-return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var q=new mxRubberband(this);this.getRubberband=function(){return q};var x=(new Date).getTime(),y=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(x=(new Date).getTime(),y=0):y=(new Date).getTime()-x};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
-this.currentState&&a.getState()==this.currentState&&2E3<y||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=q.isForceRubberbandEvent;q.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
-mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(C=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=C)}));this.popupMenuHandler.autoExpand=
-!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
+Graph=function(a,b,e,d,k,n){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var u=null,q=null,c=null,f=null,g=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(u=new mxPoint(b.getGraphX(),b.getGraphY()),g=this.isCellSelected(e.cell),c=e,q=b,null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))f=mxEvent.LABEL_HANDLE;else{var l=this.selectionCellsHandler.getHandler(e.cell);null!=l&&null!=l.bends&&0<l.bends.length&&(f=l.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(l=this.selectionCellsHandler.getHandler(e.cell),null==l||null==l.getHandleForEvent(b))){var v=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);v.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var m=this.model.getParent(e.cell),l=this.model.getParent(m);if(!this.isCellSelected(l)&&(mxUtils.intersects(v,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(l,0)!=m||mxUtils.intersects(v,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(v,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(m,0)!=e.cell||mxUtils.intersects(v,new mxRectangle(e.x+e.width-
+2,e.y,2,e.height)))&&(m=this.selectionCellsHandler.isHandled(l),this.selectCellForEvent(l,b.getEvent()),l=this.selectionCellsHandler.getHandler(l),null!=l)){var A=l.getHandleForEvent(b);null!=A&&(l.start(b.getGraphX(),b.getGraphY(),A),l.blockDelayedSelection=!m,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(l=this.getActualStartSize(e.cell),m=this.view.scale,(0<l.x||0<l.width)&&mxUtils.intersects(v,
+new mxRectangle(e.x+(l.x-l.width-1)*m+(0==l.x?e.width:0),e.y,1,e.height))||(0<l.y||0<l.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(l.y-l.height-1)*m+(0==l.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),l=this.selectionCellsHandler.getHandler(e.cell),null!=l&&(A=mxEvent.CUSTOM_HANDLE-l.customHandles.length+1,l.start(b.getGraphX(),b.getGraphY(),A),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
+mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=u&&null!=c&&null!=q){if(b=c,Math.abs(u.x-d.getGraphX())>e||Math.abs(u.y-d.getGraphY())>e){var l=this.selectionCellsHandler.getHandler(b.cell);null==l&&this.model.isEdge(b.cell)&&(l=this.createHandler(b));if(null!=l&&null!=l.bends&&0<l.bends.length){e=l.getHandleForEvent(q);
+var v=this.view.getEdgeStyle(b),m=v==mxEdgeStyle.EntityRelation;g||f!=mxEvent.LABEL_HANDLE||(e=f);if(m&&0!=e&&e!=l.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!m||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==l.bends.length-1||null!=b.visibleTargetState)m||e==mxEvent.LABEL_HANDLE||(m=b.absolutePoints,null!=m&&(null==v&&null==e||v==mxEdgeStyle.OrthConnector)&&(e=f,null==e&&(e=new mxRectangle(u.x,
+u.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,m[0].x,m[0].y)?e=0:mxUtils.contains(e,m[m.length-1].x,m[m.length-1].y)?e=l.bends.length-1:null!=v&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,u.x,u.y),e=null==v?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),l.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
+l&&(this.selectionCellsHandler.isHandlerActive(l)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,l),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||l.destroy());g=!1;u=q=c=f=null}}else if(b=d.getState(),null!=b){l=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),m=b.absolutePoints,null!=m)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
+d.getGraphX(),d.getGraphY()))l="move";else if(mxUtils.contains(e,m[0].x,m[0].y)||mxUtils.contains(e,m[m.length-1].x,m[m.length-1].y))l="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),l="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<m.length-1&&0<=e&&(l=0==Math.round(m[e].x-m[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
+1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(m=this.model.getParent(b.cell),v=this.model.getParent(m),!this.isCellSelected(v)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(m,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))l="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(v,0)!=m||mxUtils.intersects(e,new mxRectangle(b.x,
+b.y+b.height-2,b.width,3)))l="row-resize";for(m=b;null==l&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var v=this.getActualStartSize(m.cell),A=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(m.x+(v.x-v.width-1)*A+(0==v.x?m.width*A:0),m.y,1,m.height))?l="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(m.x,m.y+(v.y-v.height-1)*A+(0==v.y?m.height:0),m.width,1))&&(l="row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=
+l&&b.setCursor(l)}}),mouseUp:mxUtils.bind(this,function(a,b){f=u=q=c=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,
+f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*d+f.x)*e,(g.y*b+f.y)*e,d*e,b*e));for(m=1;m<g.height;m++)c.push(new mxRectangle((g.x*d+f.x)*e,((g.y+m)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var m=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=m.apply(this,arguments),b=new mxDictionary,f=[],d=0;d<c.length;d++){var e=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&
+this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==e||b.get(e)||(b.put(e,!0),f.push(e))}return f};var t=this.graphHandler.start;this.graphHandler.start=function(a,c,b,f){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var x=(new Date).getTime(),C=0,z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;z.apply(this,arguments);a!=this.currentState?(x=(new Date).getTime(),C=0):C=(new Date).getTime()-x};var D=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
+this.currentState&&a.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(a){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var y=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return y.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
+mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(B=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=B)}));this.popupMenuHandler.autoExpand=
+!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var E=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return E.apply(this,arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);
-return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var I=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return I.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var K=
-this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:K.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var u=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();
-u=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),b=c.getProperty("cell");null==b?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),q.start(f.x,f.y)):null!=u?this.addSelectionCells(u):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);u=null;c.consume()}}));
-this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
-null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var H=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return H.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(b,c);return b};var G=
+this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:G.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();
+v=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),p.start(b.x,b.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);v=null;c.consume()}}));
+this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var b=a.view.graph;return c&&(b.isCellSelected(a.cell)||b.isTableRow(a.cell)&&b.selectionCellsHandler.isHandled(b.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
+null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var K=this.updateMouseEvent;this.updateMouseEvent=function(a){a=K.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,b,e,d,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
Graph.zapGremlins=function(a){for(var b=0,e=[],d=0;d<a.length;d++){var k=a.charCodeAt(d);(32<=k||9==k||10==k||13==k)&&65535!=k&&65534!=k||(e.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&e.push(a.substring(b));return 0==e.length?a:e.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
@@ -2427,21 +2427,21 @@ Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,b=!0,l=null,t=mxUtils.bind(this,function(a){b=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),c=mxUtils.bind(this,function(a){b=b&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<d&&Math.abs(l.y-mxEvent.getClientY(a))<d}),f=mxUtils.bind(this,function(c){if(b)for(var f=mxEvent.getSource(c);null!=
-f&&f!=e.node;){if("a"==f.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,f,c);break}f=f.parentNode}});mxEvent.addGestureListeners(e.node,t,c,f);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,u=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,u,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(a,b){a=null!=a?a:!0;b=null!=b?b:!0;var d=this.model;return d.filterDescendants(function(e){return a&&d.isVertex(e)||b&&d.isEdge(e)},d.getRoot())};Graph.prototype.getStartEditingCell=function(a,b){var d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==
d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(d=0;d<this.model.getChildCount(a);d++){var e=this.model.getChildAt(a,d);if(this.isCellEditable(e)){a=e;break}}return a};Graph.prototype.copyStyle=function(a){var b=null;if(null!=a){b=mxUtils.clone(this.getCurrentCellStyle(a));
-a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var e=a[d],c=e.indexOf("=");if(0<=c){var f=e.substring(0,c),e=e.substring(c+1);null==b[f]&&e==mxConstants.NONE&&(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,e){e=null!=e?e:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<b.length;d++)for(var c=this.getCurrentCellStyle(b[d]),f=0;f<e.length;f++){var g=c[e[f]],m=a[e[f]];g==m||null==g&&m==mxConstants.NONE||this.setCellStyles(e[f],
-m,[b[d]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,t,c,f){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-
-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,t,c,f){t=null!=t?t:!0;c=null!=c?c:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var m=this.model.getChildAt(e,d),p=this.getScaledCellAt(a,b,m,t,c,f);if(null!=p)return p;if(this.isCellVisible(m)&&(c&&this.model.isEdge(m)||t&&this.model.isVertex(m))&&(p=this.view.getState(m),null!=p&&(null==
-f||!f(p,a,b))&&this.intersects(p,a,b)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
+a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var e=a[d],q=e.indexOf("=");if(0<=q){var c=e.substring(0,q),e=e.substring(q+1);null==b[c]&&e==mxConstants.NONE&&(b[c]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,e){e=null!=e?e:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<b.length;d++)for(var k=this.getCurrentCellStyle(b[d]),c=0;c<e.length;c++){var f=k[e[c]],g=a[e[c]];f==g||null==f&&g==mxConstants.NONE||this.setCellStyles(e[c],
+g,[b[d]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,u,q,c){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-
+this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,u,q,c){u=null!=u?u:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var f=this.model.getChildCount(e)-1;0<=f;f--){var d=this.model.getChildAt(e,f),l=this.getScaledCellAt(a,b,d,u,q,c);if(null!=l)return l;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||u&&this.model.isVertex(d))&&(l=this.view.getState(d),null!=l&&(null==
+c||!c(l,a,b))&&this.intersects(l,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?
this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,
-this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var t=
-a.style.display;a.style.display="none";a.getBBox();a.style.display=t}}catch(c){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,c=this.view.scale,f=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=c,this.view.translate=f,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var u=
+a.style.display;a.style.display="none";a.getBBox();a.style.display=u}}catch(q){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=n)};var e=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(a,b,n){var d=this.useCssTransforms,k=this.view.scale,c=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(l){}return d};
+Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(n){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var e=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,b)){e=this.graph.getCellStyle(a);if("stackLayout"==e.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(e,
@@ -2456,36 +2456,36 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,t=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var c=e?"getUTC":"get",f=a[c+"Date"](),g=a[c+"Day"](),m=a[c+"Month"](),p=a[c+"FullYear"](),n=a[c+"Hours"](),v=a[c+"Minutes"](),q=a[c+"Seconds"](),c=a[c+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),y={d:f,dd:t(f),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:m+1,mm:t(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:v,MM:t(v),s:q,ss:t(q),l:t(c,3),L:t(99<c?Math.round(c/10):c),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<x?"-":"+")+t(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,u=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),g=a[q+"Month"](),l=a[q+"FullYear"](),m=a[q+"Hours"](),t=a[q+"Minutes"](),p=a[q+"Seconds"](),q=a[q+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),C={d:c,dd:u(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:g+1,mm:u(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(l).slice(2),yyyy:l,h:m%12||12,hh:u(m%12||12),H:m,HH:u(m),M:t,MM:u(t),s:p,ss:u(p),l:u(q,3),L:u(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<x?"-":"+")+u(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in C?C[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
-k.defaultChecked=!0);e.appendChild(k);var c=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",c);mxUtils.write(e,c);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var t=k.substring(1,k.length-1);if("id"==t)l=a.id;else if(0>t.indexOf("{"))for(var c=a;null==l&&null!=c;)null!=c.value&&"object"==typeof c.value&&(l=c.hasAttribute(t)?null!=c.getAttribute(t)?c.getAttribute(t):"":null),c=this.model.getParent(c);
-null==l&&(l=this.getGlobalVariable(t))}e.push(b.substring(d,match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var u=k.substring(1,k.length-1);if("id"==u)n=a.id;else if(0>u.indexOf("{"))for(var q=a;null==n&&null!=q;)null!=q.value&&"object"==typeof q.value&&(n=q.hasAttribute(u)?null!=q.getAttribute(u)?q.getAttribute(u):"":null),q=this.model.getParent(q);
+null==n&&(n=this.getGlobalVariable(u))}e.push(b.substring(d,match.index)+(null!=n?n:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,e,d,k,l,t,c){l=l?l:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var f=this.isCloneConnectSource(a),g=f?a:this.getCompositeParent(a),m=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);b==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=e):b==
-mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+e):(m.x=b==mxConstants.DIRECTION_WEST?m.x-e:m.x+(g.geometry.width+e),m.y+=g.geometry.height/2);var p=this.view.getState(this.model.getParent(a));e=this.view.scale;var n=this.view.translate,g=n.x*e,n=n.y*e;null!=p&&this.model.isVertex(p.cell)&&(g=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);l=l?null:(new mxRectangle(g+m.x*e,n+m.y*e)).grow(40);l=null!=l?this.getCells(0,
-0,0,0,null,null,l):null;var v=null!=l&&0<l.length?l.reverse()[0]:null,q=!1;null!=v&&this.model.isAncestor(v,a)&&(q=!0,v=null);null==v&&(l=this.getSwimlaneAt(g+m.x*e,n+m.y*e),null!=l&&(q=!1,v=l));for(l=v;null!=l;){if(this.isCellLocked(l)){v=null;break}l=this.model.getParent(l)}null!=v&&(l=this.view.getState(a),p=this.view.getState(v),null!=l&&null!=p&&mxUtils.intersects(l,p)&&(v=null));var x=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;x&&(b==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/
-2:b==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=b==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);null==v||this.isCellConnectable(v)||this.isSwimlane(v)||(k=this.getModel().getParent(v),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(v=k));if(v==a||this.model.isEdge(v)||!this.isCellConnectable(v)&&!this.isSwimlane(v))v=null;var y=[],D=null!=v&&this.isSwimlane(v),z=D?null:v;k=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();
-try{if(null==z&&x){for(var g=null!=e?e:a,p=this.getCellGeometry(g);null!=p&&p.relative;)g=this.getModel().getParent(g),p=this.getCellGeometry(g);g=f?a:this.getCompositeParent(g);z=null!=e?e:this.duplicateCells([g],!1)[0];null!=e&&this.addCells([z],this.model.getParent(a),null,null,null,!0);p=this.getCellGeometry(z);null!=p&&(p.x=m.x-p.width/2,p.y=m.y-p.height/2);D?(this.addCells([z],v,null,null,null,!0),v=null):!x||null!=v||q||f||this.addCells([z],this.getDefaultParent(),null,null,null,!0)}var n=
-mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&x||null==v&&f?null:this.insertEdge(this.model.getParent(a),null,"",a,z,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var k=null;for(e=a;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=n.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==n.parent&&(k=e.parent.getIndex(e),this.model.add(e.parent,n,k))}null==v&&null!=z&&null!=a.parent&&f&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),
-this.model.add(a.parent,z,k));null!=n&&y.push(n);null==v&&null!=z&&y.push(z);null==z&&null!=n&&n.geometry.setTerminalPoint(m,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}}if(null!=c)c(y);else return y});if(null==t||null!=z||!x||null==v&&f)return k(z);t(g+m.x*e,n+m.y*e,k)};
+Graph.prototype.connectVertex=function(a,b,e,d,k,n,u,q){n=n?n:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var c=this.isCloneConnectSource(a),f=c?a:this.getCompositeParent(a),g=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(f.geometry.x,f.geometry.y);b==mxConstants.DIRECTION_NORTH?(g.x+=f.geometry.width/2,g.y-=e):b==
+mxConstants.DIRECTION_SOUTH?(g.x+=f.geometry.width/2,g.y+=f.geometry.height+e):(g.x=b==mxConstants.DIRECTION_WEST?g.x-e:g.x+(f.geometry.width+e),g.y+=f.geometry.height/2);var l=this.view.getState(this.model.getParent(a));e=this.view.scale;var m=this.view.translate,f=m.x*e,m=m.y*e;null!=l&&this.model.isVertex(l.cell)&&(f=l.x,m=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);n=n?null:(new mxRectangle(f+g.x*e,m+g.y*e)).grow(40);n=null!=n?this.getCells(0,
+0,0,0,null,null,n):null;var t=null!=n&&0<n.length?n.reverse()[0]:null,p=!1;null!=t&&this.model.isAncestor(t,a)&&(p=!0,t=null);null==t&&(n=this.getSwimlaneAt(f+g.x*e,m+g.y*e),null!=n&&(p=!1,t=n));for(n=t;null!=n;){if(this.isCellLocked(n)){t=null;break}n=this.model.getParent(n)}null!=t&&(n=this.view.getState(a),l=this.view.getState(t),null!=n&&null!=l&&mxUtils.intersects(n,l)&&(t=null));var x=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;x&&(b==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/
+2:b==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=b==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==t||this.isCellConnectable(t)||this.isSwimlane(t)||(k=this.getModel().getParent(t),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(t=k));if(t==a||this.model.isEdge(t)||!this.isCellConnectable(t)&&!this.isSwimlane(t))t=null;var C=[],z=null!=t&&this.isSwimlane(t),D=z?null:t;k=mxUtils.bind(this,function(f){if(null==u||null!=f||null==t&&c){this.model.beginUpdate();
+try{if(null==D&&x){for(var e=null!=f?f:a,m=this.getCellGeometry(e);null!=m&&m.relative;)e=this.getModel().getParent(e),m=this.getCellGeometry(e);e=c?a:this.getCompositeParent(e);D=null!=f?f:this.duplicateCells([e],!1)[0];null!=f&&this.addCells([D],this.model.getParent(a),null,null,null,!0);m=this.getCellGeometry(D);null!=m&&(m.x=g.x-m.width/2,m.y=g.y-m.height/2);z?(this.addCells([D],t,null,null,null,!0),t=null):!x||null!=t||p||c||this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var l=
+mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&x||null==t&&c?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var k=null;for(f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=l.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==l.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,l,k))}null==t&&null!=D&&null!=a.parent&&c&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),
+this.model.add(a.parent,D,k));null!=l&&C.push(l);null==t&&null!=D&&C.push(D);null==D&&null!=l&&l.geometry.setTerminalPoint(g,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=q)q(C);else return C});if(null==u||null!=D||!x||null==t&&c)return k(D);u(f+g.x*e,m+g.y*e,k)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var t=this.view.getState(e[l]),c=this.getCellGeometry(e[l]);if(null!=t&&null!=c){var f=Math.round(c.width-t.width/this.view.scale),g=Math.round(c.height-t.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(e[l]),p=this.layoutManager.getLayout(m);
-null==p?null!=k&&this.isMoveCellsEvent(k,t)&&this.moveSiblings(t,m,f,g):null!=k&&mxEvent.isAltDown(k)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),t=this.getCellGeometry(k[b]);null!=l&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),t=this.view.getState(a);null!=t&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,t.width/this.view.scale-l.width):l.height+=d+Math.min(0,t.height/this.view.scale-l.height),this.model.setGeometry(a,
-l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var u=this.view.getState(e[n]),q=this.getCellGeometry(e[n]);if(null!=u&&null!=q){var c=Math.round(q.width-u.width/this.view.scale),f=Math.round(q.height-u.height/this.view.scale);if(0!=f||0!=c){var g=this.model.getParent(e[n]),l=this.layoutManager.getLayout(g);
+null==l?null!=k&&this.isMoveCellsEvent(k,u)&&this.moveSiblings(u,g,c,f):null!=k&&mxEvent.isAltDown(k)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(g,l,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),u=this.getCellGeometry(k[b]);null!=n&&null!=u&&(u=u.clone(),u.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],u))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),u=this.view.getState(a);null!=u&&null!=n&&(n=n.clone(),b.horizontal?n.width+=e+Math.min(0,u.width/this.view.scale-n.width):n.height+=d+Math.min(0,u.height/this.view.scale-n.height),this.model.setGeometry(a,
+n));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(a,b,e){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var e=this.container.clientWidth-b,d=this.container.clientHeight-b,k=Math.floor(20*Math.min(e/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var l=this.view.translate;this.container.scrollTop=(a.y+l.y)*k-Math.max((d-a.height*k)/2+b/2,0);this.container.scrollLeft=(a.x+l.x)*k-Math.max((e-a.width*k)/2+b/2,0)}};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var e=this.container.clientWidth-b,d=this.container.clientHeight-b,k=Math.floor(20*Math.min(e/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(a.y+n.y)*k-Math.max((d-a.height*k)/2+b/2,0);this.container.scrollLeft=(a.x+n.x)*k-Math.max((e-a.width*k)/2+b/2,0)}};
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2497,8 +2497,8 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.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(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());
-null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(d.getState());
+null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||
this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
@@ -2508,175 +2508,175 @@ this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,e):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),n=e.getGraphY(),k=this.getStateAt(a,k,n);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,e):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(a,b,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,e,mxEvent.isControlDown(e),mxEvent.isControlDown(e)),e,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var e=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
-(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,f,b){if(null!=e){var c=new mxRectangle(f,b,a.clientWidth,a.clientHeight);mxUtils.intersects(c,e)&&(a==this.arrowUp?b-=c.y+c.height-e.y:a==this.arrowRight?f+=e.x+e.width-c.x:a==this.arrowDown?b+=e.y+e.height-c.y:a==this.arrowLeft&&(f-=c.x+c.width-e.x))}a.style.left=f+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
+(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,c,b){if(null!=e){var f=new mxRectangle(c,b,a.clientWidth,a.clientHeight);mxUtils.intersects(f,e)&&(a==this.arrowUp?b-=f.y+f.height-e.y:a==this.arrowRight?c+=e.x+e.width-f.x:a==this.arrowDown?b+=e.y+e.height-f.y:a==this.arrowLeft&&(c-=f.x+f.width-e.x))}a.style.left=c+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var l=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(a,f){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==l||c.height<3*l.height&&c.width<3*l.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(b,this.arrowRight);t(d,this.arrowLeft);t(k,this.arrowUp);t(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var n=this.graph.getCellGeometry(this.currentState.cell),u=mxUtils.bind(this,function(a,c){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==n||b.height<3*n.height&&b.width<3*n.width)?c.style.visibility="visible":c.style.visibility="hidden"});u(b,this.arrowRight);u(d,this.arrowLeft);u(k,this.arrowUp);u(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var l=0;l<e;l++){var t=this.cloneCell(b),c=this.getCellGeometry(t);null!=c&&(c.x+=l*d,c.y+=l*k);a.insert(t)}return a};
-Graph.prototype.createTable=function(a,b,e,d,k,l,t,c,f){e=null!=e?e:60;d=null!=d?d:40;l=null!=l?l:30;c=null!=c?c:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
-0,0,b*e,a*d+(null!=k?l:0),null!=t?t:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?l:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,c),this.createVertex(null,null,"",0,0,e,d,f),b,e,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,b,e){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=e&&(d[k].value=e[k]),null!=b)for(var l=this.model.getChildCells(d[k],!0),t=0;t<l.length;t++)null!=b[k][t]&&(l[t].value=b[k][t]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d,k,l,t,c,f){e=null!=e?e:120;d=null!=d?d:120;k=null!=k?k:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-k=this.createVertex(null,null,"",0,0,b*e,a*d,null!=l?l:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");l=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=l;k.geometry.height+=l;t=this.createVertex(null,null,"",0,l,b*e+l,d,t);k.insert(this.createParent(t,this.createVertex(null,null,"",l,0,e,d,c),b,e,0));return 1<a?(t.geometry.y=
-d+l,this.createParent(k,this.createParent(t,this.createVertex(null,null,"",l,0,e,d,f),b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=b;d.setGeometry(a,k);var l=d.getParent(a),t=d.getChildCells(l,!0);if(!e){var c=mxUtils.indexOf(t,a);if(c<t.length-1){var f=t[c+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=b,g.height-=b,d.setGeometry(f,g))}}var m=this.getCellGeometry(l);null!=m&&(e||(e=a==t[t.length-1]),e&&(m=m.clone(),m.height+=b,d.setGeometry(l,m)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(l,!0)}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var d=this.getModel(),k=d.getParent(a),l=d.getParent(k),t=d.getChildCells(k,!0);a=mxUtils.indexOf(t,a);var c=a==t.length-1;d.beginUpdate();try{for(var f=d.getChildCells(l,!0),g=0;g<f.length;g++){var k=f[g],t=d.getChildCells(k,!0),m=t[a],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=b,d.setGeometry(m,p));a<t.length-1&&(m=t[a+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),p.x+=b,e||(p.width-=b),d.setGeometry(m,p)))}if(c||
-e){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.width+=b,d.setGeometry(l,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(l,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,b){for(var e=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(e+=b?k.width:k.height)}return e};TableLayout.prototype.getRowLayout=function(a,b){for(var e=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(e,!0),l=b-d.x-d.width,t=[],d=d.x,c=0;c<e.length;c++){var f=this.graph.getCellGeometry(e[c]);null!=f&&(d+=f.width*l/k,t.push(Math.round(d)))}return t};
-TableLayout.prototype.layoutRow=function(a,b,e,d){var k=this.graph.getModel(),l=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var t=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var f=0;f<l.length;f++){var g=this.graph.getCellGeometry(l[f]);null!=g&&(g=g.clone(),g.y=a.y,g.height=e-a.y-a.height,null!=b?(g.x=b[f],g.width=b[f+1]-g.x,f==l.length-1&&f<b.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=t,t+=g.width,f==l.length-1?g.width=d-a.x-a.width-c:c+=g.width),k.setGeometry(l[f],g))}return c};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),l="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),t=this.graph.getModel(),c=0;t.beginUpdate();try{var f=e.height-b.y-b.height,g=e.width-b.x-b.width,m=t.getChildCells(a,!0),p=this.getSize(m,!1);if(0<f&&0<g&&0<m.length&&0<p){if(k){var n=this.graph.getCellGeometry(m[m.length-
-1]);null!=n&&(n=n.clone(),n.height=f-p+n.height,t.setGeometry(m[m.length-1],n))}for(var v=l?null:this.getRowLayout(m[0],g),q=b.y,x=0;x<m.length;x++)n=this.graph.getCellGeometry(m[x]),null!=n&&(n=n.clone(),n.x=b.x,n.width=g,n.y=Math.round(q),q=k||d?q+n.height:q+n.height/p*f,n.height=Math.round(q)-n.y,t.setGeometry(m[x],n)),c=Math.max(c,this.layoutRow(m[x],v,n.height,g));d&&f<p&&(e=e.clone(),e.height=q+b.height,t.setGeometry(a,e));l&&g<c+Graph.minTableColumnWidth&&(e=e.clone(),e.width=c+b.width+b.x+
-Graph.minTableColumnWidth,t.setGeometry(a,e))}}finally{t.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var f=this.getState(a);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this,
-arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
-1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,f,d){var e=new mxPoint(f,d);e.type=c;b.push(e);e=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==e||e.type!=c||e.x!=f||e.y!=d},e=.5*this.scale,f=!1,b=[],q=0;q<c.length-1;q++){for(var k=
-c[q+1],l=c[q],t=[],z=c[q+2];q<c.length-2&&mxUtils.ptSegDistSq(l.x,l.y,z.x,z.y,k.x,k.y)<1*this.scale*this.scale;)k=z,q++,z=c[q+2];for(var f=d(0,l.x,l.y)||f,E=0;E<this.validEdges.length;E++){var A=this.validEdges[E],C=A.absolutePoints;if(null!=C&&mxUtils.intersects(a,A)&&"1"!=A.style.noJump)for(A=0;A<C.length-1;A++){for(var G=C[A+1],F=C[A],z=C[A+2];A<C.length-2&&mxUtils.ptSegDistSq(F.x,F.y,z.x,z.y,G.x,G.y)<1*this.scale*this.scale;)G=z,A++,z=C[A+2];z=mxUtils.intersection(l.x,l.y,k.x,k.y,F.x,F.y,G.x,
-G.y);if(null!=z&&(Math.abs(z.x-l.x)>e||Math.abs(z.y-l.y)>e)&&(Math.abs(z.x-k.x)>e||Math.abs(z.y-k.y)>e)&&(Math.abs(z.x-F.x)>e||Math.abs(z.y-F.y)>e)&&(Math.abs(z.x-G.x)>e||Math.abs(z.y-G.y)>e)){G=z.x-l.x;F=z.y-l.y;z={distSq:G*G+F*F,x:z.x,y:z.y};for(G=0;G<t.length;G++)if(t[G].distSq>z.distSq){t.splice(G,0,z);z=null;break}null==z||0!=t.length&&t[t.length-1].x===z.x&&t[t.length-1].y===z.y||t.push(z)}}}for(A=0;A<t.length;A++)f=d(1,t[A].x,t[A].y)||f}z=c[c.length-1];f=d(0,z.x,z.y)||f}a.routedPoints=b;return f}return!1};
-var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
-"jumpStyle","none"),g=!0,m=null,l=null,t=[],z=null;a.begin();for(var E=0;E<this.state.routedPoints.length;E++){var A=this.state.routedPoints[E],C=new mxPoint(A.x/this.scale,A.y/this.scale);0==E?C=c[0]:E==this.state.routedPoints.length-1&&(C=c[c.length-1]);var G=!1;if(null!=m&&1==A.type){var F=this.state.routedPoints[E+1],A=F.x/this.scale-C.x,F=F.y/this.scale-C.y,A=A*A+F*F;null==z&&(z=new mxPoint(C.x-m.x,C.y-m.y),l=Math.sqrt(z.x*z.x+z.y*z.y),0<l?(z.x=z.x*d/l,z.y=z.y*d/l):z=null);A>d*d&&0<l&&(A=m.x-
-C.x,F=m.y-C.y,A=A*A+F*F,A>d*d&&(G=new mxPoint(C.x-z.x,C.y-z.y),A=new mxPoint(C.x+z.x,C.y+z.y),t.push(G),this.addPoints(a,t,b,f,!1,null,g),t=0>Math.round(z.x)||0==Math.round(z.x)&&0>=Math.round(z.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-z.y*t,G.y+z.x*t),a.lineTo(A.x-z.y*t,A.y+z.x*t),a.lineTo(A.x,A.y)):"arc"==e?(t*=1.3,a.curveTo(G.x-z.y*t,G.y+z.x*t,A.x-z.y*t,A.y+z.x*t,A.x,A.y)):(a.moveTo(A.x,A.y),g=!0),t=[A],G=!0))}else z=null;G||(t.push(C),m=C)}this.addPoints(a,t,b,f,!1,null,g);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),f=mxUtils.getRotatedPoint(f,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(c,f,0==g&&e,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),f=mxUtils.getRotatedPoint(f,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,
-a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||m<d)b=g,d=m}}null!=b&&(e=b)}return e};var t=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var f=t.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(f=b.state.view.graph.replacePlaceholders(b.state.cell,f));return f};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var f=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var b=f.substring(8,f.length-1),d=mxUtils.parseXml(Graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",k,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var n=0;n<e;n++){var u=this.cloneCell(b),q=this.getCellGeometry(u);null!=q&&(q.x+=n*d,q.y+=n*k);a.insert(u)}return a};
+Graph.prototype.createTable=function(a,b,e,d,k,n,u,q,c){e=null!=e?e:60;d=null!=d?d:40;n=null!=n?n:30;q=null!=q?q:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";c=null!=c?c:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
+0,0,b*e,a*d+(null!=k?n:0),null!=u?u:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,q),this.createVertex(null,null,"",0,0,e,d,c),b,e,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,b,e){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=e&&(d[k].value=e[k]),null!=b)for(var n=this.model.getChildCells(d[k],!0),u=0;u<n.length;u++)null!=b[k][u]&&(n[u].value=b[k][u]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d,k,n,u,q,c){e=null!=e?e:120;d=null!=d?d:120;k=null!=k?k:40;u=null!=u?u:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";q=null!=q?q:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+k=this.createVertex(null,null,"",0,0,b*e,a*d,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=n;k.geometry.height+=n;u=this.createVertex(null,null,"",0,n,b*e+n,d,u);k.insert(this.createParent(u,this.createVertex(null,null,"",n,0,e,d,q),b,e,0));return 1<a?(u.geometry.y=
+d+n,this.createParent(k,this.createParent(u,this.createVertex(null,null,"",n,0,e,d,c),b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=b;d.setGeometry(a,k);var n=d.getParent(a),u=d.getChildCells(n,!0);if(!e){var q=mxUtils.indexOf(u,a);if(q<u.length-1){var c=u[q+1],f=this.getCellGeometry(c);null!=f&&(f=f.clone(),f.y+=b,f.height-=b,d.setGeometry(c,f))}}var g=this.getCellGeometry(n);null!=g&&(e||(e=a==u[u.length-1]),e&&(g=g.clone(),g.height+=b,d.setGeometry(n,g)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var d=this.getModel(),k=d.getParent(a),n=d.getParent(k),u=d.getChildCells(k,!0);a=mxUtils.indexOf(u,a);var q=a==u.length-1;d.beginUpdate();try{for(var c=d.getChildCells(n,!0),f=0;f<c.length;f++){var k=c[f],u=d.getChildCells(k,!0),g=u[a],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.width+=b,d.setGeometry(g,l));a<u.length-1&&(g=u[a+1],l=this.getCellGeometry(g),null!=l&&(l=l.clone(),l.x+=b,e||(l.width-=b),d.setGeometry(g,l)))}if(q||
+e){var m=this.getCellGeometry(n);null!=m&&(m=m.clone(),m.width+=b,d.setGeometry(n,m))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,b){for(var e=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(e+=b?k.width:k.height)}return e};TableLayout.prototype.getRowLayout=function(a,b){for(var e=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(e,!0),n=b-d.x-d.width,u=[],d=d.x,q=0;q<e.length;q++){var c=this.graph.getCellGeometry(e[q]);null!=c&&(d+=c.width*n/k,u.push(Math.round(d)))}return u};
+TableLayout.prototype.layoutRow=function(a,b,e,d){var k=this.graph.getModel(),n=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var u=a.x,q=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var c=0;c<n.length;c++){var f=this.graph.getCellGeometry(n[c]);null!=f&&(f=f.clone(),f.y=a.y,f.height=e-a.y-a.height,null!=b?(f.x=b[c],f.width=b[c+1]-f.x,c==n.length-1&&c<b.length-2&&(f.width=d-f.x-a.x-a.width)):(f.x=u,u+=f.width,c==n.length-1?f.width=d-a.x-a.width-q:q+=f.width),k.setGeometry(n[c],f))}return q};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),n="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),u=this.graph.getModel(),q=0;u.beginUpdate();try{var c=e.height-b.y-b.height,f=e.width-b.x-b.width,g=u.getChildCells(a,!0),l=this.getSize(g,!1);if(0<c&&0<f&&0<g.length&&0<l){if(k){var m=this.graph.getCellGeometry(g[g.length-
+1]);null!=m&&(m=m.clone(),m.height=c-l+m.height,u.setGeometry(g[g.length-1],m))}for(var t=n?null:this.getRowLayout(g[0],f),p=b.y,x=0;x<g.length;x++)m=this.graph.getCellGeometry(g[x]),null!=m&&(m=m.clone(),m.x=b.x,m.width=f,m.y=Math.round(p),p=k||d?p+m.height:p+m.height/l*c,m.height=Math.round(p)-m.y,u.setGeometry(g[x],m)),q=Math.max(q,this.layoutRow(g[x],t,m.height,f));d&&c<l&&(e=e.clone(),e.height=p+b.height,u.setGeometry(a,e));n&&f<q+Graph.minTableColumnWidth&&(e=e.clone(),e.width=q+b.width+b.x+
+Graph.minTableColumnWidth,u.setGeometry(a,e))}}finally{u.endUpdate()}}};
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,f){f=null!=f?f:!0;var c=this.getState(a);null!=c&&f&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
+arguments);null!=c&&f&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
+1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},t=.5*this.scale,b=!1,d=[],p=0;p<c.length-1;p++){for(var x=
+c[p+1],k=c[p],n=[],q=c[p+2];p<c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,x.x,x.y)<1*this.scale*this.scale;)x=q,p++,q=c[p+2];for(var b=e(0,k.x,k.y)||b,u=0;u<this.validEdges.length;u++){var y=this.validEdges[u],B=y.absolutePoints;if(null!=B&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<B.length-1;y++){for(var E=B[y+1],F=B[y],q=B[y+2];y<B.length-2&&mxUtils.ptSegDistSq(F.x,F.y,q.x,q.y,E.x,E.y)<1*this.scale*this.scale;)E=q,y++,q=B[y+2];q=mxUtils.intersection(k.x,k.y,x.x,x.y,F.x,F.y,E.x,
+E.y);if(null!=q&&(Math.abs(q.x-k.x)>t||Math.abs(q.y-k.y)>t)&&(Math.abs(q.x-x.x)>t||Math.abs(q.y-x.y)>t)&&(Math.abs(q.x-F.x)>t||Math.abs(q.y-F.y)>t)&&(Math.abs(q.x-E.x)>t||Math.abs(q.y-E.y)>t)){E=q.x-k.x;F=q.y-k.y;q={distSq:E*E+F*F,x:q.x,y:q.y};for(E=0;E<n.length;E++)if(n[E].distSq>q.distSq){n.splice(E,0,q);q=null;break}null==q||0!=n.length&&n[n.length-1].x===q.x&&n[n.length-1].y===q.y||n.push(q)}}}for(y=0;y<n.length;y++)b=e(1,n[y].x,n[y].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};
+var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
+"jumpStyle","none"),g=!0,x=null,n=null,q=[],u=null;a.begin();for(var I=0;I<this.state.routedPoints.length;I++){var y=this.state.routedPoints[I],B=new mxPoint(y.x/this.scale,y.y/this.scale);0==I?B=b[0]:I==this.state.routedPoints.length-1&&(B=b[b.length-1]);var E=!1;if(null!=x&&1==y.type){var F=this.state.routedPoints[I+1],y=F.x/this.scale-B.x,F=F.y/this.scale-B.y,y=y*y+F*F;null==u&&(u=new mxPoint(B.x-x.x,B.y-x.y),n=Math.sqrt(u.x*u.x+u.y*u.y),0<n?(u.x=u.x*f/n,u.y=u.y*f/n):u=null);y>f*f&&0<n&&(y=x.x-
+B.x,F=x.y-B.y,y=y*y+F*F,y>f*f&&(E=new mxPoint(B.x-u.x,B.y-u.y),y=new mxPoint(B.x+u.x,B.y+u.y),q.push(E),this.addPoints(a,q,d,c,!1,null,g),q=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(E.x-u.y*q,E.y+u.x*q),a.lineTo(y.x-u.y*q,y.y+u.x*q),a.lineTo(y.x,y.y)):"arc"==e?(q*=1.3,a.curveTo(E.x-u.y*q,E.y+u.x*q,y.x-u.y*q,y.y+u.x*q,y.x,y.y)):(a.moveTo(y.x,y.y),g=!0),q=[y],E=!0))}else u=null;E||(q.push(B),x=B)}this.addPoints(a,q,d,c,!1,null,g);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var k=Math.cos(-g),q=Math.sin(-g),c=mxUtils.getRotatedPoint(c,k,q,l);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);k+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);c=this.getPerimeterPoint(b,c,0==g&&f,k);0!=g&&(k=Math.cos(g),q=Math.sin(g),c=mxUtils.getRotatedPoint(c,k,q,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,m){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;if(null!=a)for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,
+a[c]);if(null!=f){var g=(f.x-m.x)*(f.x-m.x)+(f.y-m.y)*(f.y-m.y);if(null==e||g<e)d=f,e=g}}null!=d&&(m=d)}return m};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=u.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(Graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
+mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(u){null!=window.console&&console.log("error in getStencil:",k,u)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",a,t)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var t=d.getAttribute("w"),
-c=d.getAttribute("h"),t=null==t?80:parseInt(t,10),c=null==c?80:parseInt(c,10);b(k,l,a,t,c)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(u){null!=window.console&&console.log("error in loadStencilSet:",a,u)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,n)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var u=d.getAttribute("w"),
+q=d.getAttribute("h"),u=null==u?80:parseInt(u,10),q=null==q?80:parseInt(q,10);b(k,n,a,u,q)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return e.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||d.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=
function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];
-return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=l.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var f=c.apply(this,arguments);this.error=
-null;return f});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),f=
-0;f<c.length;f++)null!=this.currentEdgeStyle[c[f]]&&(a+=c[f]+"="+this.currentEdgeStyle[c[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,f){this.model.beginUpdate();try{for(var b=0;b<f.length;b++)if(this.model.isVertex(f[b])||this.model.isEdge(f[b])){this.setCellStyles(a,null,[f[b]]);var d=this.getCellStyle(f[b])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
-c,[f[b]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var f=0;f<a.length;f++){var b=a[f];c[mxObjectIdentity.get(b)]=
-b.getId();for(var d=this.model.getChildCount(b),e=0;e<d;e++)this.createCellLookup([this.model.getChildAt(b,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,f){f=null!=f?f:{};for(var b in a){var d=c[b];null==f[d]&&(f[d]=a[b].getId()||"")}return f};Graph.prototype.importGraphModel=function(a,c,f,b){c=null!=c?c:0;f=null!=f?f:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];var d={},g={},u=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),d));if(null!=
-u){var m=this.createCellLookup([e.root]),u=u.slice();this.model.beginUpdate();try{if(1!=u.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<u.length;e++){var p=this.model.getChildren(this.moveCells([u[e]],c,f,!1,this.model.getRoot())[0]);null!=p&&(a=a.concat(p))}else a=this.moveCells(e.getChildren(u[0]),c,f,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,m,g),this.updateCustomLinks(g,a),b)){this.isGridEnabled()&&
-(c=this.snap(c),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(a,!0);null!=n&&this.moveCells(a,c-n.x,f-n.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},f=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var e=new mxCodec,g=new mxGraphModel,u=g.getChildAt(g.getRoot(),0),d=0;d<f.length;d++){g.add(u,f[d]);var m=this.view.getState(a[d]);if(null!=m){var p=this.getCellGeometry(f[d]);null!=p&&p.relative&&!this.model.isEdge(a[d])&&
-null==b.get(this.model.getParent(a[d]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),f);return e.encode(g)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var f=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var t=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(a){var c=this.model.getParent(a);if(null!=c){var f=this.getCurrentCellStyle(c);if(null!=f.expand)return"0"!=f.expand}return t.apply(this,arguments)&&(null==c||!this.isTable(c))};var c=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,f,b,d,e,g,u,m){null==m&&(m=this.model.getParent(a),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(g,u,null,!0,!1));c.apply(this,[a,f,b,d,e,g,u,m])};var f=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(a,c,b){if(c||b)f.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,g=[],u=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(g.push(c),c==d)e=g.length-1;else if(a&&null==d&&0<g.length||null!=e&&a&&g.length>e||!a&&0<e)return;for(var f=0;f<this.model.getChildCount(c);f++)u(this.model.getChildAt(c,f))});u(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var g=Graph.prototype.moveCells;
-Graph.prototype.moveCells=function(a,c,f,b,d,e,u){u=null!=u?u:{};if(this.isTable(d)){for(var m=[],p=0;p<a.length;p++)this.isTable(a[p])?m=m.concat(this.model.getChildCells(a[p],!0).reverse()):m.push(a[p]);a=m}this.model.beginUpdate();try{m=[];for(p=0;p<a.length;p++)if(null!=d&&this.isTableRow(a[p])){var n=this.model.getParent(a[p]),q=this.getCellGeometry(a[p]);this.isTable(n)&&m.push(n);if(null!=n&&null!=q&&this.isTable(n)&&this.isTable(d)&&(b||n!=d)){if(!b){var Q=this.getCellGeometry(n);null!=Q&&
-(Q=Q.clone(),Q.height-=q.height,this.model.setGeometry(n,Q))}Q=this.getCellGeometry(d);null!=Q&&(Q=Q.clone(),Q.height+=q.height,this.model.setGeometry(d,Q));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=b?this.cloneCell(a[p]):a[p],v=this.model.getChildCells(k,!0),l=this.model.getChildCells(B[0],!0),x=l.length-v.length;if(0<x)for(var J=0;J<x;J++){var y=this.cloneCell(v[v.length-1]);null!=y&&(y.value="",this.model.add(k,y))}else if(0>x)for(J=0;J>x;J--)this.model.remove(v[v.length+J-1]);
-v=this.model.getChildCells(k,!0);for(J=0;J<l.length;J++){var P=this.getCellGeometry(l[J]),ba=this.getCellGeometry(v[J]);null!=P&&null!=ba&&(ba=ba.clone(),ba.width=P.width,this.model.setGeometry(v[J],ba))}}}}for(var H=g.apply(this,arguments),p=0;p<m.length;p++)!b&&this.model.contains(m[p])&&0==this.model.getChildCount(m[p])&&this.model.remove(m[p]);b&&this.updateCustomLinks(this.createCellMapping(u,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(a,c){var f=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),e=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(e)?0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(f,e)&&f.push(e):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(e=this.model.getParent(a[b]),0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(f,e))){for(var g=this.model.getChildCells(e,!0),u=0,p=0;p<
-g.length;p++)0<=mxUtils.indexOf(a,g[p])&&u++;u==g.length&&f.push(e)}f.push(a[b])}f=m.apply(this,[f,c])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(a,c){for(var f=0;f<c.length;f++)null!=c[f]&&this.updateCustomLinksForCell(a,c[f])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var f=mxUtils.getValue(a.style,"points",null);if(null!=f){var b=[];try{for(var d=JSON.parse(f),f=0;f<d.length;f++){var e=
-d[f];b.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(Ba){}return b}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;f=a.shape.scale;b=d.width/f;d=d.height/f;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=b,b=d,d=e;f=a.shape.getConstraints(a.style,b,d);if(null!=f)return f;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=
-a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),f=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&
-(d=this.getCellGeometry(d),null==d||d.relative||f++)}return 0<f||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,f){for(var b=this.getCurrentCellStyle(a),d=!0,e=!0,g=0;g<c.length&&e;g++)d=d&&this.isTable(c[g]),e=e&&this.isTableRow(c[g]);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||e||d)};Graph.prototype.createGroupCell=
-function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var f=this.getModel(),b=[];f.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(f.isEdge(e)){var g=f.getTerminal(e,!0),u=f.getTerminal(e,!1);f.setTerminal(e,u,!0);f.setTerminal(e,g,!1);var m=f.getGeometry(e);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);
-m.setTerminalPoint(p,!1);m.setTerminalPoint(n,!0);f.setGeometry(e,m);var q=this.view.getState(e),B=this.view.getState(g),v=this.view.getState(u);if(null!=q){var k=null!=B?this.getConnectionConstraint(q,B,!0):null,Q=null!=v?this.getConnectionConstraint(q,v,!1):null;this.setConnectionConstraint(e,g,!0,Q);this.setConnectionConstraint(e,u,!1,k)}b.push(e)}}else if(f.isVertex(e)&&(m=this.getCellGeometry(e),null!=m)){if(!this.isTable(e)&&!this.isTableRow(e)&&!this.isTableCell(e)){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var l=m.width;m.width=m.height;m.height=l;f.setGeometry(e,m)}var x=this.view.getState(e);if(null!=x){var J=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],y=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,J[mxUtils.mod(mxUtils.indexOf(J,y)+(c?-1:1),J.length)],[e])}b.push(e)}}}finally{f.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
-function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var p=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
-(c=this.model.getParent(c));var f=this.view.getState(c);null!=f&&null!=f.shape&&(this.view.invalidate(c),f.shape.bounds=null)}p.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var f=this.view.getState(a[c]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
-this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var f=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=a.innerHTML;a.parentNode.replaceChild(f,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var f=a.getElementsByTagName("*"),b=
-0;b<f.length;b++)c(f[b])};Graph.prototype.updateLabelElements=function(a,c,f){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){b.innerHTML=e;for(var g=b.getElementsByTagName(null!=f?f:"*"),u=0;u<g.length;u++)c(g[u]);b.innerHTML!=e&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,f){c=Graph.zapGremlins(c);this.model.beginUpdate();
-try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=
-function(a){if(null!=a){for(var c=new mxDictionary,f=0;f<a.length;f++)c.put(a[f],!0);for(var b=[],f=0;f<a.length;f++){var d=this.model.getParent(a[f]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(f=0;f<b.length;f++)if(d=this.view.getState(b[f]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var e=!0,g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],f=0;f<a.length;f++)this.isCellDeletable(a[f])&&this.isTransparentState(this.view.getState(a[f]))&&c.push(a[f]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,f){a=null!=a.value&&"object"===
-typeof a.value?a.value.getAttribute(c):null;return null!=a?a:f};Graph.prototype.setAttributeForCell=function(a,c,f){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=f?b.setAttribute(c,f):b.removeAttribute(c);this.model.setValue(a,b)};var n=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,f,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=
-0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;for(var e=n.apply(this,arguments),g=!0,d=0;d<a.length&&g;d++)g=g&&this.isTableRow(a[d]);g&&(this.isTableCell(e)&&(e=this.model.getParent(e)),this.isTableRow(e)&&(e=this.model.getParent(e)),this.isTable(e)||(e=null));return e};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&
-(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=d||null!=b&&null!=b.text&&null!=b.text.node&&null!=b.text.boundingBox&&(mxUtils.contains(b.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(b.text.node,
-mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(null==b&&(b=this.view.getState(this.getCellAt(f.x,f.y))),c=this.addText(f.x,f.y,b))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-
-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,b.x*d.width),f=Math.max(f,b.y*d.height);return new mxPoint(this.snap(c+a),this.snap(f+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),f=this.getInsertPoint(),b=this.snap(Math.round(Math.max(f.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(f.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,
+return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var n=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=n.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=
+null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),b=
+0;b<c.length;b++)null!=this.currentEdgeStyle[c[b]]&&(a+=c[b]+"="+this.currentEdgeStyle[c[b]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,b){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)if(this.model.isVertex(b[f])||this.model.isEdge(b[f])){this.setCellStyles(a,null,[b[f]]);var d=this.getCellStyle(b[f])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
+c,[b[f]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var f=a[b];c[mxObjectIdentity.get(f)]=
+f.getId();for(var d=this.model.getChildCount(f),e=0;e<d;e++)this.createCellLookup([this.model.getChildAt(f,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,b){b=null!=b?b:{};for(var f in a){var d=c[f];null==b[d]&&(b[d]=a[f].getId()||"")}return b};Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];var d={},g={},m=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),d));if(null!=
+m){var l=this.createCellLookup([e.root]),m=m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<m.length;e++){var v=this.model.getChildren(this.moveCells([m[e]],c,b,!1,this.model.getRoot())[0]);null!=v&&(a=a.concat(v))}else a=this.moveCells(e.getChildren(m[0]),c,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),f)){this.isGridEnabled()&&
+(c=this.snap(c),b=this.snap(b));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,c-p.x,b-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},b=this.cloneCells(a,null,c),f=new mxDictionary,d=0;d<a.length;d++)f.put(a[d],!0);for(var e=new mxCodec,g=new mxGraphModel,m=g.getChildAt(g.getRoot(),0),d=0;d<b.length;d++){g.add(m,b[d]);var l=this.view.getState(a[d]);if(null!=l){var v=this.getCellGeometry(b[d]);null!=v&&v.relative&&!this.model.isEdge(a[d])&&
+null==f.get(this.model.getParent(a[d]))&&(v.offset=null,v.relative=!1,v.x=l.x/l.view.scale-l.view.translate.x,v.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),b);return e.encode(g)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var b=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return b==mxConstants.SHAPE_SWIMLANE||"table"==b}return!1};var u=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(a){var c=this.model.getParent(a);if(null!=c){var b=this.getCurrentCellStyle(c);if(null!=b.expand)return"0"!=b.expand}return u.apply(this,arguments)&&(null==c||!this.isTable(c))};var q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,f,d,e,g,m){null==m&&(m=this.model.getParent(a),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(e,g,null,!0,!1));q.apply(this,[a,c,b,f,d,e,g,m])};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(a,b,f){if(b||f)c.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,g=[],m=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(g.push(c),c==d)e=g.length-1;else if(a&&null==d&&0<g.length||null!=e&&a&&g.length>e||!a&&0<e)return;for(var b=0;b<this.model.getChildCount(c);b++)m(this.model.getChildAt(c,b))});m(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var f=Graph.prototype.moveCells;
+Graph.prototype.moveCells=function(a,c,b,d,e,g,m){m=null!=m?m:{};if(this.isTable(e)){for(var l=[],v=0;v<a.length;v++)this.isTable(a[v])?l=l.concat(this.model.getChildCells(a[v],!0).reverse()):l.push(a[v]);a=l}this.model.beginUpdate();try{l=[];for(v=0;v<a.length;v++)if(null!=e&&this.isTableRow(a[v])){var p=this.model.getParent(a[v]),t=this.getCellGeometry(a[v]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(e)&&(d||p!=e)){if(!d){var x=this.getCellGeometry(p);null!=x&&
+(x=x.clone(),x.height-=t.height,this.model.setGeometry(p,x))}x=this.getCellGeometry(e);null!=x&&(x=x.clone(),x.height+=t.height,this.model.setGeometry(e,x));var A=this.model.getChildCells(e,!0);if(0<A.length){var P=d?this.cloneCell(a[v]):a[v],k=this.model.getChildCells(P,!0),K=this.model.getChildCells(A[0],!0),n=K.length-k.length;if(0<n)for(var q=0;q<n;q++){var z=this.cloneCell(k[k.length-1]);null!=z&&(z.value="",this.model.add(P,z))}else if(0>n)for(q=0;q>n;q--)this.model.remove(k[k.length+q-1]);
+k=this.model.getChildCells(P,!0);for(q=0;q<K.length;q++){var T=this.getCellGeometry(K[q]),y=this.getCellGeometry(k[q]);null!=T&&null!=y&&(y=y.clone(),y.width=T.width,this.model.setGeometry(k[q],y))}}}}for(var ia=f.apply(this,arguments),v=0;v<l.length;v++)!d&&this.model.contains(l[v])&&0==this.model.getChildCount(l[v])&&this.model.remove(l[v]);d&&this.updateCustomLinks(this.createCellMapping(m,this.createCellLookup(a)),ia)}finally{this.model.endUpdate()}return ia};var g=Graph.prototype.removeCells;
+Graph.prototype.removeCells=function(a,c){var b=[];this.model.beginUpdate();try{for(var f=0;f<a.length;f++)if(this.isTableCell(a[f])){var d=this.model.getParent(a[f]),e=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(e)?0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(b,e)&&b.push(e):this.labelChanged(a[f],"")}else{if(this.isTableRow(a[f])&&(e=this.model.getParent(a[f]),0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(b,e))){for(var m=this.model.getChildCells(e,!0),l=0,v=0;v<
+m.length;v++)0<=mxUtils.indexOf(a,m[v])&&l++;l==m.length&&b.push(e)}b.push(a[f])}b=g.apply(this,[b,c])}finally{this.model.endUpdate()}return b};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=
+d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(Da){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=
+a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&
+(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,b){for(var f=this.getCurrentCellStyle(a),d=!0,e=!0,g=0;g<c.length&&e;g++)d=d&&this.isTable(c[g]),e=e&&this.isTableRow(c[g]);return("1"!=mxUtils.getValue(f,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(f,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||e||d)};Graph.prototype.createGroupCell=
+function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var b=this.getModel(),f=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),m=b.getTerminal(e,!1);b.setTerminal(e,m,!0);b.setTerminal(e,g,!1);var l=b.getGeometry(e);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var v=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);
+l.setTerminalPoint(v,!1);l.setTerminalPoint(p,!0);b.setGeometry(e,l);var t=this.view.getState(e),x=this.view.getState(g),A=this.view.getState(m);if(null!=t){var k=null!=x?this.getConnectionConstraint(t,x,!0):null,P=null!=A?this.getConnectionConstraint(t,A,!1):null;this.setConnectionConstraint(e,g,!0,P);this.setConnectionConstraint(e,m,!1,k)}f.push(e)}}else if(b.isVertex(e)&&(l=this.getCellGeometry(e),null!=l)){if(!this.isTable(e)&&!this.isTableRow(e)&&!this.isTableCell(e)){l=l.clone();l.x+=l.width/
+2-l.height/2;l.y+=l.height/2-l.width/2;var K=l.width;l.width=l.height;l.height=K;b.setGeometry(e,l)}var n=this.view.getState(e);if(null!=n){var q=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,q[mxUtils.mod(mxUtils.indexOf(q,z)+(c?-1:1),q.length)],[e])}f.push(e)}}}finally{b.endUpdate()}return f};Graph.prototype.stencilHasPlaceholders=
+function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
+(c=this.model.getParent(c));var b=this.view.getState(c);null!=b&&null!=b.shape&&(this.view.invalidate(c),b.shape.bounds=null)}l.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var b=this.view.getState(a[c]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&
+this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var b=a.getElementsByTagName("*"),f=
+0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var g=f.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)c(g[l]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();
+try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=
+function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var f=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||c.get(d)||(c.put(d,!0),f.push(d))}for(b=0;b<f.length;b++)if(d=this.view.getState(f[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var e=!0,g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&this.isTransparentState(this.view.getState(a[b]))&&c.push(a[b]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){a=null!=a.value&&"object"===
+typeof a.value?a.value.getAttribute(c):null;return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};var m=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=
+0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;for(var e=m.apply(this,arguments),g=!0,d=0;d<a.length&&g;d++)g=g&&this.isTableRow(a[d]);g&&(this.isTableCell(e)&&(e=this.model.getParent(e)),this.isTableRow(e)&&(e=this.model.getParent(e)),this.isTable(e)||(e=null));return e};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&
+(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&null!=f.text.boundingBox&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,
+mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(null==f&&(f=this.view.getState(this.getCellAt(b.x,b.y))),c=this.addText(b.x,b.y,f))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-
+this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,
a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a: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-a.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/
-2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,f){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=f&&this.model.isEdge(f.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(f,a,c);b.geometry.x=Math.round(1E4*
-d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(f,b.geometry),e=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=f?f.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=f?f.origin.y:0),b.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=f?f.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};Graph.prototype.addClickHandler=function(a,c,f){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++){var b=this.getAbsoluteUrl(a[f].getAttribute("href"));null!=b&&(a[f].setAttribute("rel",this.linkRelation),a[f].setAttribute("href",
-b),null!=c&&mxEvent.addGestureListeners(a[f],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,e=this.getTolerance(),g=this,u={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,f){return null==
+2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){f.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*
+d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else d=this.view.translate,f.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=b?b.origin.x:0),f.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=b?b.origin.y:0),f.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",
+f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==
g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=
-this.currentLink){var f=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(f>e||b>e)&&this.clear()}}else{for(f=c.getSource();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},
-mouseUp:function(a,b){for(var d=b.getSource(),u=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(u)||mxEvent.isMiddleMouseButton(u))&&!mxEvent.isPopupTrigger(u)||mxEvent.isTouchEvent(u))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,
-5)&&d||null==c||c(u,this.currentLink),mxEvent.isConsumed(u)||(u=mxEvent.isMiddleMouseButton(u)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,u),b.consume())):null!=f&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&f(b.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&
-(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(u);mxEvent.addListener(document,"mouseleave",function(a){u.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var f=
-0;f<a.length;f++)this.isTableCell(a[f])&&(a[f]=this.model.getParent(a[f]));a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,e=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),f=0;f<a.length;f++){var u=b.getParent(a[f]),m=this.moveCells([g[f]],d,d,!1)[0];e.push(m);if(c)b.add(u,g[f]);else{var p=u.getIndex(a[f]);b.add(u,g[f],p+1)}if(this.isTable(u)){var n=this.getCellGeometry(g[f]),q=this.getCellGeometry(u);null!=n&&null!=q&&(q=q.clone(),q.height+=n.height,b.setGeometry(u,
-q))}}}finally{b.endUpdate()}return e};Graph.prototype.insertImage=function(a,c,f){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<b.length;e++)d.push(b[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",f);break}}};Graph.prototype.insertLink=function(a){if(null!=
-this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),f=[],b=0;b<c.length;b++)f.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==f.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=f[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(f=c[0].parentNode;null!=c[0].firstChild;)f.insertBefore(c[0].firstChild,c[0]);
-f.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var f=[],b=null,
-d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var u=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,u):u,d=null!=d?Math.min(d,u):u;f.push(g)}}if(2<f.length){f.sort(function(c,f){return a?c.x-f.x:c.y-f.y});g=this.view.translate;u=this.view.scale;d=d/u-(a?g.x:g.y);b=b/u-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(b-d)/(f.length-1),b=d,e=1;e<f.length-1;e++){var p=this.view.getState(this.model.getParent(f[e].cell)),n=this.getCellGeometry(f[e].cell),
-b=b+m;null!=n&&null!=p&&(n=n.clone(),a?n.x=Math.round(b-n.width/2)-p.origin.x:n.y=Math.round(b-n.height/2)-p.origin.y,this.getModel().setGeometry(f[e].cell,n))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=
-function(a,c,f,b,d,e,g,u,m,p){var n=this.useCssTransforms;n&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var q=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==q)throw Error(mxResources.get("drawingEmpty"));var B=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=
-k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var l=Math.max(1,Math.ceil(q.width*a)+2*f)+(p?5:0),x=Math.max(1,Math.ceil(q.height*a)+2*f)+(p?5:0);k.setAttribute("version","1.1");k.setAttribute("width",l+"px");k.setAttribute("height",x+"px");k.setAttribute("viewBox",
-(d?"-0.5 -0.5":"0 0")+" "+l+" "+x);v.appendChild(k);var J=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"g"):v.createElement("g");k.appendChild(J);var y=this.createSvgCanvas(J);y.foOffset=d?-.5:0;y.textOffset=d?-.5:0;y.imageOffset=d?-.5:0;y.translate(Math.floor((f/c-q.x)/B),Math.floor((f/c-q.y)/B));var P=document.createElement("div"),H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,u,m,p,n,q,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=
-e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),B=[],La=0,k=0;(0==Na||La<Na)&&k<e.length;){var v=e.charCodeAt(k);if(10==v||13==v){if(0<La)break}else B.push(e.charAt(k)),255>v&&La++;k++}B.length<e.length&&1<e.length-B.length&&(e=mxUtils.trim(B.join(""))+"...");return e}catch(Ya){return H.apply(this,arguments)}else return H.apply(this,arguments)};var Q=this.backgroundImage;if(null!=Q){c=B/c;var S=this.view.translate,A=new mxRectangle(S.x*c,S.y*c,Q.width*
-c,Q.height*c);mxUtils.intersects(q,A)&&y.image(S.x,S.y,Q.width,Q.height,Q.src,!0)}y.scale(a);y.textEnabled=g;u=null!=u?u:this.createSvgImageExport();var t=u.drawCellState,z=u.getLinkForCellState;u.getLinkForCellState=function(a,c){var f=z.apply(this,arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};u.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&t.apply(this,
-arguments)};u.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(y,k);return k}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform",
+this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},
+mouseUp:function(a,f){for(var d=f.getSource(),l=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,
+5)&&d||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&
+(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var b=
+0;b<a.length;b++)this.isTableCell(a[b])&&(a[b]=this.model.getParent(a[b]));a=this.model.getTopmostCells(a);var f=this.getModel(),d=this.gridSize,e=[];f.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),b=0;b<a.length;b++){var l=f.getParent(a[b]),m=this.moveCells([g[b]],d,d,!1)[0];e.push(m);if(c)f.add(l,g[b]);else{var v=l.getIndex(a[b]);f.add(l,g[b],v+1)}if(this.isTable(l)){var p=this.getCellGeometry(g[b]),t=this.getCellGeometry(l);null!=p&&null!=t&&(t=t.clone(),t.height+=p.height,f.setGeometry(l,
+t))}}}finally{f.endUpdate()}return e};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=
+this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);
+b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,
+d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),f=null!=f?Math.max(f,l):l,d=null!=d?Math.min(d,l):l;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);f=f/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),
+f=f+m;null!=p&&null!=v&&(p=p.clone(),a?p.x=Math.round(f-p.width/2)-v.origin.x:p.y=Math.round(f-p.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=
+function(a,c,b,f,d,e,g,l,m,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,A=mxUtils.createXmlDocument(),k=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"svg"):A.createElement("svg");null!=a&&(null!=
+k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==A.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var K=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),n=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);k.setAttribute("version","1.1");k.setAttribute("width",K+"px");k.setAttribute("height",n+"px");k.setAttribute("viewBox",
+(d?"-0.5 -0.5":"0 0")+" "+K+" "+n);A.appendChild(k);var q=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"g"):A.createElement("g");k.appendChild(q);var z=this.createSvgCanvas(q);z.foOffset=d?-.5:0;z.textOffset=d?-.5:0;z.imageOffset=d?-.5:0;z.translate(Math.floor((b/c-t.x)/x),Math.floor((b/c-t.y)/x));var y=document.createElement("div"),T=z.getAlternateText;z.getAlternateText=function(a,c,b,f,d,e,g,l,m,v,p,t,X){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(y.innerHTML=
+e,e=mxUtils.extractTextWithWhitespace(y.childNodes));for(var Na=Math.ceil(2*f/this.state.fontSize),x=[],A=0,k=0;(0==Na||A<Na)&&k<e.length;){var K=e.charCodeAt(k);if(10==K||13==K){if(0<A)break}else x.push(e.charAt(k)),255>K&&A++;k++}x.length<e.length&&1<e.length-x.length&&(e=mxUtils.trim(x.join(""))+"...");return e}catch(Xa){return T.apply(this,arguments)}else return T.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){c=x/c;var O=this.view.translate,N=new mxRectangle(O.x*c,O.y*c,P.width*
+c,P.height*c);mxUtils.intersects(t,N)&&z.image(O.x,O.y,P.width,P.height,P.src,!0)}z.scale(a);z.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var C=l.drawCellState,u=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var b=u.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&C.apply(this,
+arguments)};l.drawState(this.getView().getState(this.model.root),z);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(z,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),f=a.createElement("g");f.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform",
"translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,
-Graph.foreignObjectWarningText);f.appendChild(b);d.appendChild(e);f.appendChild(d);c.appendChild(f)}};Graph.prototype.updateSvgLinks=function(a,c,f){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++){var d=a[b].getAttribute("href");null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=
-!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,f){for(;null!=a&&a.nodeName!=c;){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,f){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==
-f)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var f=document.createRange();f.selectNode(a);c.removeAllRanges();c.addRange(f)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.deleteCells=function(a,c){var f=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=
-0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var e=this.getCellGeometry(a[b]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var u=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=u)for(f=[],b=0;b<u.length;b++)this.model.contains(u[b])&&(this.model.isVertex(u[b])||this.model.isEdge(u[b]))&&f.push(u[b])}return f};Graph.prototype.insertTableColumn=
-function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=mxUtils.indexOf(f.getChildCells(e,!0),a);else this.isTableRow(a)?b=f.getParent(a):a=f.getChildCells(b,!0)[0],c||(d=f.getChildCells(a,!0).length-1);for(var g=f.getChildCells(b,!0),u=Graph.minTableColumnWidth,e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],p=f.cloneCell(m,!1),n=this.getCellGeometry(p);p.value=null;if(null!=n){var u=n.width,q=this.getCellGeometry(g[e]);
-null!=q&&(n.height=q.height)}f.add(g[e],p,d+(c?0:1))}var B=this.getCellGeometry(b);null!=B&&(B=B.clone(),B.width+=u,f.setGeometry(b,B))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=f.getParent(a);else var e=f.getChildCells(b,!0),d=e[c?0:e.length-1];var g=f.getChildCells(d,!0),u=b.getIndex(d),d=f.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);
-if(null!=m){for(e=0;e<g.length;e++){a=f.cloneCell(g[e],!1);d.insert(a);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=m.height)}f.add(b,d,u+(c?0:1));var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(b,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(0==d.length)c.remove(f);
-else{this.isTableRow(b)||(b=d[0]);var e=c.getChildCells(b,!0);if(1>=e.length)c.remove(f);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(b=a=0;b<d.length;b++){var u=c.getChildCells(d[b],!0)[g];c.remove(u);var m=this.getCellGeometry(u);null!=m&&(a=Math.max(a,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=a,c.setGeometry(f,p))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&
-(a=b=c.getParent(a));this.isTableRow(a)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(1>=d.length)c.remove(f);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var e=this.getCellGeometry(b);null!=e&&(a=e.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(f,g))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var f=a.tBodies[0],b=f.rows[0].cells,d=0,e=0;e<b.length;e++)var g=b[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);
-f=f.insertRow(c);for(e=0;e<d;e++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var f=a.tHead;if(null!=f)for(var b=0;b<f.rows.length;b++){var d=document.createElement("th");f.rows[b].appendChild(d);mxUtils.br(d)}f=a.tBodies[0];for(b=0;b<f.rows.length;b++)d=f.rows[b].insertCell(c),mxUtils.br(d);return f.rows[0].cells[0<=c?c:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
-c){if(0<=c)for(var f=a.tBodies[0].rows,b=0;b<f.length;b++)f[b].cells.length>c&&f[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var f=document.createElement("div");f.innerHTML=a;a=document.createDocumentFragment();for(var b;b=f.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
-function(a,c){function f(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",f(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,
-f(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&
-null==c.getState()){var f=this.getCellAt(c.graphX,c.graphY);null!=f&&this.isSwimlane(f)&&this.hitsSwimlaneContent(f,c.graphX,c.graphY)||(c.state=this.view.getState(f),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,f=!1,b=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),
-f=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(f&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var f=null!=c&&mxEvent.isShiftDown(c);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var b=!0;this.graph.processElements(this.textarea,
-function(a){f||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):b=!1});b&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],f=0,b=a.rangeCount;f<b;++f)c.push(a.getRangeAt(f));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,f=a.length;c<f;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(pa){}};var v=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var q=mxConstraintHandler.prototype.update;
-mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?q.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){a=this.graph.getStartEditingCell(a,c);x.apply(this,arguments);var f=this.graph.view.getState(a);
-this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var f=this.graph.getModel().getParent(a),b=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(f)&&null!=b&&b.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?
-"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var y=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,f){f.originalNode=a;a=a.firstChild;for(var b=f.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return f}function f(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(f(a,c),c=c.nextSibling);
-a=d}}function b(a){for(var c=a.firstChild;null!=c;){var f=c.nextSibling;b(c);c=f}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}
-y.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,b):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
-function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
-c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,u=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.push("underline");
-(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&u.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=u.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
+Graph.foreignObjectWarningText);b.appendChild(f);d.appendChild(e);b.appendChild(d);c.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=
+!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==
+b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.deleteCells=function(a,c){var b=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var f=
+0;f<a.length;f++){var d=this.model.getParent(a[f]);if(this.isTable(d)){var e=this.getCellGeometry(a[f]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=l)for(b=[],f=0;f<l.length;f++)this.model.contains(l[f])&&(this.model.isVertex(l[f])||this.model.isEdge(l[f]))&&b.push(l[f])}return b};Graph.prototype.insertTableColumn=
+function(a,c){var b=this.getModel();b.beginUpdate();try{var f=a,d=0;if(this.isTableCell(a))var e=b.getParent(a),f=b.getParent(e),d=mxUtils.indexOf(b.getChildCells(e,!0),a);else this.isTableRow(a)?f=b.getParent(a):a=b.getChildCells(f,!0)[0],c||(d=b.getChildCells(a,!0).length-1);for(var g=b.getChildCells(f,!0),l=Graph.minTableColumnWidth,e=0;e<g.length;e++){var m=b.getChildCells(g[e],!0)[d],v=b.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);
+null!=t&&(p.height=t.height)}b.add(g[e],v,d+(c?0:1))}var x=this.getCellGeometry(f);null!=x&&(x=x.clone(),x.width+=l,b.setGeometry(f,x))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var b=this.getModel();b.beginUpdate();try{var f=a,d=a;if(this.isTableCell(a))d=b.getParent(a),f=b.getParent(d);else if(this.isTableRow(a))f=b.getParent(a);else var e=b.getChildCells(f,!0),d=e[c?0:e.length-1];var g=b.getChildCells(d,!0),l=f.getIndex(d),d=b.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);
+if(null!=m){for(e=0;e<g.length;e++){a=b.cloneCell(g[e],!1);d.insert(a);a.value=null;var v=this.getCellGeometry(a);null!=v&&(v.height=m.height)}b.add(f,d,l+(c?0:1));var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.height+=m.height,b.setGeometry(f,p))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var b=a,f=a;this.isTableCell(a)&&(f=c.getParent(a));this.isTableRow(f)&&(b=c.getParent(f));var d=c.getChildCells(b,!0);if(0==d.length)c.remove(b);
+else{this.isTableRow(f)||(f=d[0]);var e=c.getChildCells(f,!0);if(1>=e.length)c.remove(b);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(f=a=0;f<d.length;f++){var l=c.getChildCells(d[f],!0)[g];c.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.width-=a,c.setGeometry(b,v))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var b=a,f=a;this.isTableCell(a)&&
+(a=f=c.getParent(a));this.isTableRow(a)&&(b=c.getParent(f));var d=c.getChildCells(b,!0);if(1>=d.length)c.remove(b);else{this.isTableRow(f)||(f=d[d.length-1]);c.remove(f);a=0;var e=this.getCellGeometry(f);null!=e&&(a=e.height);var g=this.getCellGeometry(b);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(b,g))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);
+b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
+c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
+function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,
+b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&
+null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),
+b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var b=null!=c&&mxEvent.isShiftDown(c);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var f=!0;this.graph.processElements(this.textarea,
+function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):f=!1});f&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,f=a.rangeCount;b<f;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(sa){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));t.apply(this,arguments)};var p=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?p.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){a=this.graph.getStartEditingCell(a,c);x.apply(this,arguments);var b=this.graph.view.getState(a);
+this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?
+"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);
+a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}
+C.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?b(this.textarea,f):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
+c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");
+(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
d;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(m=mxUtils.replaceTrailingNewlines(m,
-"<div><br></div>"));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
-mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=b.x*this.bounds.width;this.bounds.y+=b.y*this.bounds.height}this.textarea.style.width=
-Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
-function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var E=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-c){this.graph.getModel().beginUpdate();try{E.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
+"<div><br></div>"));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
+!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(P){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+c){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,c){return mxGraphHandlerIsValidDropTarget.apply(this,
arguments)&&!mxEvent.isAltDown(c.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;
-this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var A=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){A.apply(this,arguments);var f=this.graph.getCellStyle(a);
-if(null==f.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;null!=d&&(f=this.graph.getCellStyle(b),"stackLayout"==f.childLayout&&(f="1"==mxUtils.getValue(f,"horizontalStack","1"),d=d.clone(),f?d.height=c.height:d.width=c.width,this.graph.model.setGeometry(b,d)))}};var C=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){f.get(a)||(f.put(a,!0),d.push(a))}for(var c=
-C.apply(this,arguments),f=new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var G=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=G.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+this.hint.innerHTML=b(c,d)+", "+b(f,d);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(a,c){y.apply(this,arguments);var b=this.graph.getCellStyle(a);
+if(null==b.childLayout){var f=this.graph.model.getParent(a),d=null!=f?this.graph.getCellGeometry(f):null;null!=d&&(b=this.graph.getCellStyle(f),"stackLayout"==b.childLayout&&(b="1"==mxUtils.getValue(b,"horizontalStack","1"),d=d.clone(),b?d.height=c.height:d.width=c.width,this.graph.model.setGeometry(f,d)))}};var B=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){b.get(a)||(b.put(a,!0),d.push(a))}for(var c=
+B.apply(this,arguments),b=new mxDictionary,f=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(f.getParent(f.getParent(g))):this.graph.isTableRow(g)&&a(f.getParent(g));a(g)}return d};var E=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=E.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(a){var c=F.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var I=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return I.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 K=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return K.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)};var u=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||u.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var J=mxVertexHandler.prototype.getSelectionBorderBounds;
-mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,f=c.model,b=this.state,d=this.selectionBorder,e=this;null==a&&(a=[]);var g=c.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var u=c.view.getCellStates(f.getChildCells(g[0].cell,
-!0)),f=0;f<u.length;f++)mxUtils.bind(this,function(f){var g=u[f],m=f<u.length-1?u[f+1]:null,p=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);p.isDashed=d.isDashed;p.svgStrokeTolerance++;p=new mxHandle(g,"col-resize",null,p);p.tableHandle=!0;var n=0;p.shape.node.parentNode.insertBefore(p.shape.node,p.shape.node.parentNode.firstChild);p.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==n?mxConstants.NONE:d.stroke;this.shape.bounds.x=
-this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(f==u.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(f==u.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;p.setPosition=function(a,f,b){n=Math.max(Graph.minTableColumnWidth-a.width,f.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==m||q||(n=Math.min((m.x+m.width-g.x-g.width)/c.view.scale-Graph.minTableColumnWidth,n))};p.execute=function(a){if(0!=
-n)c.setTableColumnWidth(this.state.cell,n,q);else if(!e.blockDelayedSelection){var f=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(f,a)}n=0};p.reset=function(){n=0};a.push(p)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var u=new mxLine(new mxRectangle,mxConstants.NONE,1);u.isDashed=d.isDashed;u.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,u);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
-f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(a,c,f){m=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};f.execute=function(a){if(0!=m)c.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));
-else if(!e.blockDelayedSelection){var f=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(f,a)}m=0};f.reset=function(){m=0};a.push(f)})(f)}}return null!=a?a.reverse():null};var P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){P.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=
-a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
-"4px";f.style.padding="4px 2px 4px 2px";f.rowState=c;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
-mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var S=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=
-this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=this.customHandles[b].shape.bounds,e=d.getCenterX(),g=d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
-c):a=S.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+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 H=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(a,c){H.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 N=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){N.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&
+mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var H=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return H.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 G=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return G.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isTableRow(this.state.cell)};var v=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||v.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var K=mxVertexHandler.prototype.getSelectionBorderBounds;
+mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,b=c.model,f=this.state,d=this.selectionBorder,e=this;null==a&&(a=[]);var g=c.view.getCellStates(b.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=c.view.getCellStates(b.getChildCells(g[0].cell,
+!0)),b=0;b<l.length;b++)mxUtils.bind(this,function(b){var g=l[b],m=b<l.length-1?l[b+1]:null,v=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);v.isDashed=d.isDashed;v.svgStrokeTolerance++;v=new mxHandle(g,"col-resize",null,v);v.tableHandle=!0;var p=0;v.shape.node.parentNode.insertBefore(v.shape.node,v.shape.node.parentNode.firstChild);v.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(f.cell);this.shape.stroke=0==p?mxConstants.NONE:d.stroke;this.shape.bounds.x=
+this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=f.y+(b==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=f.height-(b==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;v.setPosition=function(a,b,f){p=Math.max(Graph.minTableColumnWidth-a.width,b.x-a.x-a.width);t=mxEvent.isShiftDown(f.getEvent());null==m||t||(p=Math.min((m.x+m.width-g.x-g.width)/c.view.scale-Graph.minTableColumnWidth,p))};v.execute=function(a){if(0!=
+p)c.setTableColumnWidth(this.state.cell,p,t);else if(!e.blockDelayedSelection){var b=c.getCellAt(a.getGraphX(),a.getGraphY())||f.cell;c.graphHandler.selectCellForEvent(b,a)}p=0};v.reset=function(){p=0};a.push(v)})(b);for(b=0;b<g.length;b++)mxUtils.bind(this,function(b){b=g[b];var l=new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;b=new mxHandle(b,"row-resize",null,l);b.tableHandle=!0;var m=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);
+b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};b.setPosition=function(a,c,b){m=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};b.execute=function(a){if(0!=m)c.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));
+else if(!e.blockDelayedSelection){var b=c.getCellAt(a.getGraphX(),a.getGraphY())||f.cell;c.graphHandler.selectCellForEvent(b,a)}m=0};b.reset=function(){m=0};a.push(b)})(b)}}return null!=a?a.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){T.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=
+a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.cell)){var b=mxUtils.createImage(Editor.rowMoveImage);b.style.position="absolute";b.style.cursor="pointer";b.style.width="7px";b.style.height=
+"4px";b.style.padding="4px 2px 4px 2px";b.rowState=c;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
+mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(b);this.graph.container.appendChild(b)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.getStencil(b);b=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!b&&null!=this.customHandles)for(var f=0;f<this.customHandles.length;f++)if(null!=
+this.customHandles[f].shape&&null!=this.customHandles[f].shape.bounds){var d=this.customHandles[f].shape.bounds,e=d.getCenterX(),g=d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){b=!0;break}}b&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
+c):a=O.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+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 N=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(a,c){N.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 J=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){J.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&
(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/e-d.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(d,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+
"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):
@@ -2688,310 +2688,310 @@ HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.pro
HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||
-mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var ea=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){ea.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&
-null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=
-!1,c.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(c.getEvent())&&
-this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),u=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(u)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(u=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),f=0;f<u.length;f++)if(this.graph.isCellMovable(u[f])){var m=this.graph.view.getState(u[f]),p=this.graph.getCellGeometry(u[f]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,g),this.graph.model.setGeometry(u[f],
-p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);f.x-=b.x;f.y-=b.y;var b=c.getX()+f.x,f=c.getY()+f.y,d=this.first.x-b,e=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==
-this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,f),this.isSpaceEvent(c)?(b=this.x+this.width,f=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=f-this.height)),
+mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){S.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==
+a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=
+!1,c.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&
+this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]);null!=m&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],
+v))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),
this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
-"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var ka=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
-this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ka.apply(this,arguments)};var na=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,f,b){T.apply(this,arguments);f!=this.currentTerminalState?(na=(new Date).getTime(),W=0):W=(new Date).getTime()-na;this.currentTerminalState=f};var Z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
-this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Z.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var f=null!=a&&0==a,b=this.state.getVisibleTerminalState(f),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,f):null,f=null!=(null!=d?
-this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var la=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
-function(a,c,f){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return la.apply(this,arguments)};var ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),f=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(f)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&
-null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ha.apply(this,arguments)};var V=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=V.apply(this,arguments),c=[],f=0;f<a.length;f++)"1"!=mxUtils.getValue(a[f].style,"part","0")&&c.push(a[f]);return c};var fa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),f=c.getParent(a.cell),
-b=this.graph.getCellGeometry(a.cell);return c.isEdge(f)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):fa.apply(this,arguments)};var R=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var f=this.graph.getModel(),b=f.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!f.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&R.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var L=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){L.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 ga=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){ga.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 O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);var a=!1;
-null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));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 c=0;4>c;c++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());this.cornerHandles.push(f)}}var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);c=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(c,f);if(null!=c||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,f){try{if(null==c&&(null==f||0==f.length)||
-1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=
-document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);
-d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=f)for(b=0;b<f.length;b++){var e=document.createElement("div");e.style.marginTop=null!=c||0<b?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[b].getAttribute("href"),
-mxUtils.getTextContent(f[b])));this.linkHint.appendChild(e)}}}catch(Aa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var X=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){X.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
-null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
-f=this.graph.getLinksForState(this.state);if(null!=c||null!=f&&0<f.length)this.updateLinkHint(c,f),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 ja=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=
-this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),c=this.cornerHandles,f=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].bounds.width/2+a;c[0].bounds.y=this.state.y-f+a;c[0].redraw();c[1].bounds.x=c[0].bounds.x+this.state.width-2*a;c[1].bounds.y=c[0].bounds.y;c[1].redraw();c[2].bounds.x=c[0].bounds.x;
-c[2].bounds.y=this.state.y+this.state.height-2*a;c[2].redraw();c[3].bounds.x=c[1].bounds.x;c[3].bounds.y=c[2].bounds.y;c[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ja.apply(this);null!=this.state&&
-null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=c&&(f=Math.max(f,c.y+c.height)),this.linkHint.style.left=
-Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/2+Editor.hintOffset)+"px")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var ja=(new Date).getTime(),da=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){ba.apply(this,arguments);b!=this.currentTerminalState?(ja=(new Date).getTime(),da=0):da=(new Date).getTime()-ja;this.currentTerminalState=b};var W=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<da||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&W.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,f,b):null,b=null!=(null!=
+d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return fa.apply(this,arguments)};var ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&
+null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ha.apply(this,arguments)};var ka=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ka.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var U=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
+f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):U.apply(this,arguments)};var ea=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ea.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
+"none"))};var L=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ca=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ca.apply(this,arguments);var a=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var c=0;4>c;c++){var b=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);b.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG;b.init(this.graph.view.getOverlayPane());this.cornerHandles.push(b)}}var f=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));f()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);c=this.graph.getLinkForCell(this.state.cell);b=this.graph.getLinksForState(this.state);this.updateLinkHint(c,b);if(null!=c||null!=b&&0<b.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){try{if(null==c&&(null==b||0==b.length)||
+1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=
+document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);
+d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var e=document.createElement("div");e.style.marginTop=null!=c||0<f?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),
+mxUtils.getTextContent(b[f])));this.linkHint.appendChild(e)}}}catch(na){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var R=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){R.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
+null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
+b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var Y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Z=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=
+this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),c=this.cornerHandles,b=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].bounds.width/2+a;c[0].bounds.y=this.state.y-b+a;c[0].redraw();c[1].bounds.x=c[0].bounds.x+this.state.width-2*a;c[1].bounds.y=c[0].bounds.y;c[1].redraw();c[2].bounds.x=c[0].bounds.x;
+c[2].bounds.y=this.state.y+this.state.height-2*a;c[2].redraw();c[3].bounds.x=c[1].bounds.x;c[3].bounds.y=c[2].bounds.y;c[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Z.apply(this);null!=this.state&&
+null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==b&&(b=this.state),b=b.y+b.height,null!=c&&(b=Math.max(b,c.y+c.height)),this.linkHint.style.left=
+Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(b+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ca=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ca.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=
0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ia=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ia.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function t(){mxShape.call(this)}function c(){mxShape.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function v(){mxActor.call(this)}function q(){mxActor.call(this)}
-function x(){mxActor.call(this)}function y(){mxActor.call(this)}function D(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,D.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,D.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,D.prototype.close);this.originalQuadTo=this.canvas.quadTo;
-this.canvas.quadTo=mxUtils.bind(this,D.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,D.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,D.prototype.arcTo)}function z(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}
-function K(){mxCylinder.call(this)}function u(){mxShape.call(this)}function J(){mxShape.call(this)}function B(){mxEllipse.call(this)}function P(){mxShape.call(this)}function S(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function N(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxShape.call(this)}function na(){mxShape.call(this)}function W(){mxShape.call(this)}function T(){mxCylinder.call(this)}function Z(){mxCylinder.call(this)}function la(){mxRectangleShape.call(this)}
-function ha(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function R(){mxArrowConnector.call(this);this.spacing=0}function L(){mxActor.call(this)}function ga(){mxRectangleShape.call(this)}function O(){mxActor.call(this)}function X(){mxActor.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function M(){mxActor.call(this)}function ia(){mxActor.call(this)}function Y(){mxActor.call(this)}function da(){mxActor.call(this)}
-function Q(){mxActor.call(this)}function ba(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function Ba(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function sa(){mxActor.call(this)}function xa(){mxActor.call(this)}function ta(){mxActor.call(this)}function oa(){mxConnector.call(this)}function ya(a,c,f,b,
-d,e,g,u,m,p){g+=m;var aa=b.clone();b.x-=d*(2*g+m);b.y-=e*(2*g+m);d*=g+m;e*=g+m;return function(){a.ellipse(aa.x-d-g,aa.y-e-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,f,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-f));this.paintForeground(a,c,f,b,d)};a.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.state){var e=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var aa=e,e=g,g=aa;a.rotate(-this.getShapeRotation(),e,g,c+b/2,f+d/2);s=this.scale;c=this.bounds.x/s;f=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,
-c,f,b,d)}};a.prototype.paintTableForeground=function(a,c,f,b,d){var e=this.state.view.graph,g=e.getActualStartSize(this.state.cell),aa=e.model.getChildCells(this.state.cell,!0);if(0<aa.length){var u="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(u)for(u=1;u<aa.length;u++){var p=e.getCellGeometry(aa[u]);null!=p&&(a.begin(),a.moveTo(c+g.x,f+p.y),a.lineTo(c+b-g.width,f+p.y),a.end(),a.stroke())}if(m)for(b=e.model.getChildCells(aa[0],
-!0),u=1;u<b.length;u++)p=e.getCellGeometry(b[u]),null!=p&&(a.begin(),a.moveTo(c+p.x+g.x,f+g.y),a.lineTo(c+p.x+g.x,f+d-g.height),a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity",this.darkOpacity)))),aa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-e,0),a.lineTo(b,e),a.lineTo(e,e),a.close(),a.fill()),0!=aa&&
-(a.setFillAlpha(Math.abs(aa)),a.setFillColor(0>aa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(b,e),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Da=
-Math.tan(mxUtils.toRadians(30)),ua=(.5-Da)/2;mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/Da);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ua);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ua)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(b,d/(.5+Da));e?(a.moveTo(0,.25*c),a.lineTo(.5*
-c,(.5-ua)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ua)*c),a.lineTo(.5*c,(1-ua)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ua),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ua)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||
-(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);
-mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity=0;l.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),
-0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.close(),a.fill()),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(t,mxShape);t.prototype.isoAngle=15;t.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,e=Math.min(b*Math.tan(e),
-.5*d);a.translate(c,f);a.begin();a.moveTo(.5*b,0);a.lineTo(b,e);a.lineTo(b,d-e);a.lineTo(.5*b,d);a.lineTo(0,d-e);a.lineTo(0,e);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,e);a.lineTo(.5*b,2*e);a.lineTo(b,e);a.moveTo(.5*b,2*e);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",t);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-a.translate(c,f);0==e?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,e),a.arcTo(.5*b,e,0,0,1,.5*b,0),a.arcTo(.5*b,e,0,0,1,b,e),a.lineTo(b,d-e),a.arcTo(.5*b,e,0,0,1,.5*b,d),a.arcTo(.5*b,e,0,0,1,0,d-e),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,e),a.arcTo(.5*b,e,0,0,1,.5*b,2*e),a.arcTo(.5*b,e,0,0,1,0,e),a.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*
-b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-e?"left"==g?(a.moveTo(0,f),a.lineTo(c,f)):(a.moveTo(b-c,f),a.lineTo(b,f)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f)):(a.moveTo(0,f),a.lineTo(b-c,f),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,d),a.lineTo(0,d),a.lineTo(0,f),a.close());a.end()};mxCellRenderer.registerShape("folder",g);mxUtils.extend(m,mxActor);m.prototype.size=30;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("card",m);mxUtils.extend(p,mxActor);p.prototype.size=.4;p.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*
-b/4,c*(1-1.4),b,c/2);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};p.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),f=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=b,new mxRectangle(a.x,a.y+c,f,b-2*c);c*=f;return new mxRectangle(a.x+c,a.y,f-
-2*c,b)}return a};mxCellRenderer.registerShape("tape",p);mxUtils.extend(n,mxActor);n.prototype.size=.3;n.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};n.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/
-4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",n);var Qa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,f,b){var d=mxUtils.getValue(this.style,"size");return null!=d?b*Math.max(0,Math.min(1,d)):Qa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,a.height*c),0,0)}return null};mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("parallelogram",v);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",q);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,c,f,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(b,d)],this.isRounded,f,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(a,c,f,b,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",
-y);D.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};D.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)};D.prototype.quadTo=function(a,c,f,b){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=b};D.prototype.curveTo=function(a,c,f,b,d,e){this.originalCurveTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=e};D.prototype.arcTo=function(a,c,f,b,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};D.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var f=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(b*b+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),aa=this.defaultVariation;
-5>g&&(g=5,aa/=3);for(var u=f(a-this.lastX)*b/g,f=f(c-this.lastY)*d/g,b=b/e,d=d/e,e=0;e<g;e++){var m=(Math.random()-.5)*aa;this.originalLineTo.call(this.canvas,u*e+this.lastX-m*d,f*e+this.lastY-m*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};D.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 Ra=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ra.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Sa=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Sa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new D(a,
-mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Ta=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"))&&Ta.apply(this,arguments)};var Ua=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,f,b,d){if(null==a.handJiggle||a.handJiggle.constructor!=D)Ua.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
-a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(b/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(b*e,d*e)),a.moveTo(c+e,f),a.lineTo(c+b-e,f),a.quadTo(c+b,f,c+b,f+e),a.lineTo(c+b,f+d-e),a.quadTo(c+b,f+d,c+b-e,f+d),a.lineTo(c+e,f+d),a.quadTo(c,f+d,c,f+d-e),a.lineTo(c,f+e),a.quadTo(c,
-f,c+e,f)):(a.moveTo(c,f),a.lineTo(c+b,f),a.lineTo(c+b,f+d),a.lineTo(c,f+d),a.lineTo(c,f)),a.close(),a.end(),a.fillAndStroke()}};var Xa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,f,b,d){null==a.handJiggle&&Xa.apply(this,arguments)};mxUtils.extend(z,mxRectangleShape);z.prototype.size=.1;z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,f=a.height;a=new mxRectangle(a.x,a.y,c,f);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,f*d));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};z.prototype.paintForeground=function(a,
-c,f,b,d){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,f);a.lineTo(c+e,f+d);a.moveTo(c+b-e,f);a.lineTo(c+b-e,f+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",z);mxUtils.extend(E,mxRectangleShape);
-E.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};E.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",E);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};
-A.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),u=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+u),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(G,mxHexagon);G.prototype.size=.25;G.prototype.fixedSize=20;G.prototype.isRoundable=function(){return!0};
-G.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,f,
-!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(I,
-mxRectangleShape);I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};I.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var u=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],aa=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],n=this.style["symbol"+e+"Spacing"]||0,q=this.style["symbol"+e+"VSpacing"]||n,B=this.style["symbol"+e+"ArcSpacing"];null!=B&&(B*=this.getArcSize(b+this.strokewidth,
-d+this.strokewidth),n+=B,q+=B);var B=c,k=f,B=u==mxConstants.ALIGN_CENTER?B+(b-aa)/2:u==mxConstants.ALIGN_RIGHT?B+(b-aa-n):B+n,k=m==mxConstants.ALIGN_MIDDLE?k+(d-p)/2:m==mxConstants.ALIGN_BOTTOM?k+(d-p-q):k+q;a.save();u=new g;u.style=this.style;g.prototype.paintVertexShape.call(u,a,B,k,aa,p);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
-(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(u,mxShape);u.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};
-mxCellRenderer.registerShape("umlActor",u);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,c,
-f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,d/8,b,7*d/8);a.fillAndStroke()};S.prototype.paintForeground=function(a,c,f,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(H,mxRectangleShape);H.prototype.size=40;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=
-function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};H.prototype.paintBackground=function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,f,b,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=H&&(g=new g,
-g.apply(this.state),a.save(),g.paintVertexShape(a,c,f,b,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+b/2,f+e),a.lineTo(c+b/2,f+d),a.end(),a.stroke())};H.prototype.paintForeground=function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,f,b,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",H);mxUtils.extend(N,mxShape);N.prototype.width=60;N.prototype.height=30;N.prototype.corner=
-10;N.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};N.prototype.paintBackground=function(a,c,f,b,d){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),u=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
-mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,f,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,f,b,d),a.setGradient(this.fill,this.gradient,c,f,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,f);a.lineTo(c+g,f);a.lineTo(c+g,f+Math.max(0,u-1.5*e));a.lineTo(c+Math.max(0,g-e),f+u);a.lineTo(c,f+u);a.close();a.fillAndStroke();a.begin();
-a.moveTo(c+g,f);a.lineTo(c+b,f);a.lineTo(c+b,f+d);a.lineTo(c,f+d);a.lineTo(c,f+u);a.stroke()};mxCellRenderer.registerShape("umlFrame",N);mxPerimeter.LifelinePerimeter=function(a,c,f,b){b=H.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;f.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
-mxPerimeter.OrthogonalPerimeter=function(a,c,f,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,f,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return f.x<
-a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,f.y)));f.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,f.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,f,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*
-c.view.scale))),c.style),c,f,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?v.prototype.fixedSize:v.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u)]):(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+d,u),new mxPoint(g+m,u),new mxPoint(g+m-d,u+p),new mxPoint(g,u+p),new mxPoint(g+d,u)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);b&&(f.x<g||f.x>g+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(u,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?q.prototype.fixedSize:q.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+
-d,u),new mxPoint(g+m-d,u),new mxPoint(g+m,u+p),new mxPoint(g,u+p),new mxPoint(g+d,u)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u),new mxPoint(g+m-d,u+p),new mxPoint(g+d,u+p),new mxPoint(g,u)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u+d),new mxPoint(g+m,u),new mxPoint(g+m,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u+d)]):(d=d?Math.max(0,Math.min(p,e)):
-p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p-d),new mxPoint(g,u+p),new mxPoint(g,u)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);b&&(f.x<g||f.x>g+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(u,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
-"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m-d,u),new mxPoint(g+m,a),new mxPoint(g+m-d,u+p),new mxPoint(g,u+p),new mxPoint(g+d,a),new mxPoint(g,u)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,
-e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+d,u),new mxPoint(g+m,u),new mxPoint(g+m-d,a),new mxPoint(g+m,u+p),new mxPoint(g+d,u+p),new mxPoint(g,a),new mxPoint(g+d,u)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u+d),new mxPoint(n,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p),new mxPoint(n,u+p-d),new mxPoint(g,u+p),new mxPoint(g,u+d)]):(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(n,u+
-d),new mxPoint(g+m,u),new mxPoint(g+m,u+p-d),new mxPoint(n,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u)]);n=new mxPoint(n,a);b&&(f.x<g||f.x>g+m?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(u,n,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,
-p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(n,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p-d),new mxPoint(n,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u+d),new mxPoint(n,u)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+
-d,u),new mxPoint(g+m-d,u),new mxPoint(g+m,a),new mxPoint(g+m-d,u+p),new mxPoint(g+d,u+p),new mxPoint(g,a),new mxPoint(g+d,u)]);n=new mxPoint(n,a);b&&(f.x<g||f.x>g+m?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(u,n,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,f);a.ellipse((b-e)/2,0,e,e);
-a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ea);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.inset=2;ka.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-
-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ka);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
-this.strokewidth;a.translate(c,f);a.ellipse(0,e,b-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",W);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=20;T.prototype.jettyHeight=10;T.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
-f=g/2;var g=f+g/2,u=Math.min(c,d-c),m=Math.min(u+2*c,d-c);e?(a.moveTo(f,u),a.lineTo(g,u),a.lineTo(g,u+c),a.lineTo(f,u+c),a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.lineTo(f,u+c),a.lineTo(0,u+c),a.lineTo(0,u),a.lineTo(f,u),a.close());a.end()};mxCellRenderer.registerShape("module",T);mxUtils.extend(Z,mxCylinder);Z.prototype.jettyWidth=32;Z.prototype.jettyHeight=12;
-Z.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,u=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(f,u),a.lineTo(g,u),a.lineTo(g,u+c),a.lineTo(f,u+c),a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.lineTo(f,u+c),a.lineTo(0,
-u+c),a.lineTo(0,u),a.lineTo(f,u),a.close());a.end()};mxCellRenderer.registerShape("component",Z);mxUtils.extend(la,mxRectangleShape);la.prototype.paintForeground=function(a,c,f,b,d){var e=b/2,g=d/2,u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,f),new mxPoint(c+b,f+g),new mxPoint(c+e,f+d),new mxPoint(c,f+g)],this.isRounded,u,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
-la);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+e,f+e,b-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,f,b,d),a.stroke())};mxCellRenderer.registerShape("endState",ha);mxUtils.extend(V,ha);V.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",V);mxUtils.extend(fa,mxArrowConnector);fa.prototype.defaultWidth=4;fa.prototype.isOpenEnded=
-function(){return!0};fa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};fa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",fa);mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=10;R.prototype.defaultArrowWidth=20;R.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};R.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",R);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(ga,mxRectangleShape);ga.prototype.dx=20;ga.prototype.dy=20;ga.prototype.isHtmlAllowed=function(){return!1};ga.prototype.paintForeground=function(a,c,f,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,f+e);a.lineTo(c+b,f+e);a.end();a.stroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+g,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ga);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=
-20;O.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(c,f),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",O);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint((b+c)/2,f),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(ja,mxActor);ja.prototype.arrowWidth=.3;ja.prototype.arrowSize=.2;ja.prototype.redrawPath=
-function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-ja);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ja.prototype.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ja.prototype.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,
-d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",M);mxUtils.extend(ia,mxActor);ia.prototype.size=.1;ia.prototype.fixedSize=20;ia.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,
-0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ia);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
-da);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
-Q);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",
-ba);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,f+d);a.lineTo(c+b,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,f);
-a.lineTo(c+b/2,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,f+.145*d);a.lineTo(c+.855*b,f+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,f+.145*d);a.lineTo(c+.145*b,f+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=
-function(a,c,f,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,f,b,d){a.begin();a.moveTo(c,f);a.lineTo(c+b,f);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,f+d);a.lineTo(c+b,f+d);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",
-Ba);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,c,f,b,d){var e=f+d-5;a.begin();a.moveTo(c,f);a.lineTo(c,f+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,f);a.lineTo(c+b,f+d);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ra);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,f,b,d){this.outline||a.setStrokeColor(null);
-if(null!=this.style){var e=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(c,f,b,d);a.fill();a.pointerEvents=e;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,f);"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,f):a.moveTo(c+b,f);"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,f+d):a.moveTo(c+b,f+d);"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,f+d):a.moveTo(c,
-f+d);"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,f);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,f),a.lineTo(c+b/2,f+d)):(a.moveTo(c,f+d/2),a.lineTo(c+b,f+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(sa,
-mxActor);sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",sa);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;f=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,
-0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()};mxCellRenderer.registerShape("display",
-ta);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,f])))};
-mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1);return function(){a.begin();
-a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1),B=b.x+n/2,k=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(B-n/2-q/2,k-q/2+n/2);a.lineTo(B-n/2+q/2,k-q/2-n/2);a.lineTo(B+q/2-3*n/2,k-3*q/2-n/2);a.lineTo(B-q/2-3*n/2,k-3*q/2+n/2);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1);return function(){a.begin();
-a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,u,m,p){var n=b.clone(),q=ya.apply(this,arguments),B=d*(g+2*m),k=e*(g+2*m);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*m,n.y-e*m);a.lineTo(n.x-2*B+d*m,n.y-2*k+e*m);a.moveTo(n.x-B-k+e*m,n.y-k+B-d*m);a.lineTo(n.x+k-B-e*m,n.y-k-B+d*m);a.stroke()}});
-mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1),B=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(B.x-q,B.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,b.y-n,B.x+q,B.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,u,m,p){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var n=b.clone();n.x-=c;n.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(n.x,n.y);u?a.lineTo(n.x-d-e/2,n.y-e+d/2):a.lineTo(n.x+e/2-d,n.y-e-d/2);
-a.lineTo(n.x-d,n.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,u,m,p,n){e*=u+p;g*=u+p;var q=d.clone();return function(){c.begin();c.moveTo(q.x,q.y);m?c.lineTo(q.x-e-g/a,q.y-g+e/a):c.lineTo(q.x+g/a-e,q.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,f){return Fa(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+
-d*c/4-b*g/2)},function(c,b,d,e,g,u){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Fa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,u=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-u.x,m=d.y-u.y,p=Math.sqrt(e*e+m*m),u=b.call(this,p,e/p,m/p,u,d);return new mxPoint(u.x/g-c.x,u.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,u=g.length-1;c=a.view.translate;var m=a.view.scale,p=f?g[0]:
-g[u],g=f?g[1]:g[u-1],u=g.x-p.x,n=g.y-p.y,q=Math.sqrt(u*u+n*n);b.x=(b.x+c.x)*m;b.y=(b.y+c.y)*m;d.call(this,q,u/q,n/q,p,g,b,e)})},za=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ja.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ja.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth=
-Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-f.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-f.x)/c.width))})]}},Ka=function(a,c,f){return function(b){var d=[U(b,["size"],function(f){var b=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(f.x+b,f.y+b)},function(c,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,f.x-c.x),Math.min(c.height,f.y-c.y)))/a)},!1)];f&&mxUtils.getValue(b.style,
-mxConstants.STYLE_ROUNDED,!1)&&d.push(va(b));return d}},Ga=function(a,c,f,b,d){f=null!=f?f:.5;return function(e){var g=[U(e,["size"],function(c){var f=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",f?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(f?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-a.x:Math.max(0,Math.min(f,(c.x-a.x)/a.width));
-this.state.style.size=a},!1,b)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Ma=function(a,c,f){a=null!=a?a:.5;return function(b){var d=[U(b,["size"],function(b){var d=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?f:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,e*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=null!=f&&"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?b.x-c.x:Math.max(0,Math.min(a,(b.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(b));return d}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return U(a,[mxConstants.STYLE_ARCSIZE],function(f){var b=null!=c?c:f.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,d),f.y+b)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*d),f.y+b)},function(c,f,b){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,
-2*(c.x+c.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-f.x+c.x)/Math.min(c.width,c.height))))})},U=function(a,c,f,b,d,e,g){var u=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);u.execute=function(a){for(var f=0;f<c.length;f++)this.copyStyle(c[f]);g&&g(a)};u.getPosition=f;u.setPosition=b;u.ignoreGrid=null!=d?d:!0;if(e){var m=u.positionChanged;u.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);
-a.view.validate()}}return u},Ha={link:function(a){return[Pa(a,!0,10),Pa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,f=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
-f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||
-Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),f.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*
-a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=
-a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),f.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,
-f,b,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;
-a.style.endWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
-c&&(a.style.endWidth=a.style.startWidth))})));return f},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,f/2))}c.push(U(a,[mxConstants.STYLE_STARTSIZE],function(c){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
-c.y+Math.max(0,Math.min(c.height,f))):new mxPoint(c.x+Math.max(0,Math.min(c.width,f)),c.getCenterY())},function(c,f){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,f.y-c.y))):Math.round(Math.max(0,Math.min(c.width,f.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var f=c.getSwimlaneDirection(a.style),b=c.model.getParent(a.cell),
-b=c.model.getChildCells(b,!0),d=[],e=0;e<b.length;e++)b[e]!=a.cell&&c.isSwimlane(b[e])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[e]))==f&&d.push(b[e]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[U(a,["width","height"],function(a){var c=Math.max(N.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",N.prototype.width))),f=Math.max(1.5*N.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",N.prototype.height)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.width=Math.round(Math.max(N.prototype.corner,
-Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*N.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[U(a,
-["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var f=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/f*2,Math.max(0,a.getCenterX()-c.x)/f*2)))})]},note:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];
-mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},dataStorage:function(a){return[U(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",c?ia.prototype.fixedSize:ia.prototype.size));return new mxPoint(a.x+a.width-f*(c?1:a.width),a.getCenterY())},function(a,c){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,
-(a.x+a.width-c.x)/a.width));this.state.style.size=f},!1)]},callout:function(a){var c=[U(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+f*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=
-Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),U(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),U(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,f*a.width+b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))},!1)];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ga.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ga.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[U(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",T.prototype.jettyWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",T.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*f)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,
-Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},tee:function(a){return[U(a,["dx","dy"],
-function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[U(a,["tabWidth","tabHeight"],
-function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+f)},function(a,c){var f=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(f=a.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[U(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[U(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",t.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=
-Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[U(a,["size"],function(a){var f=Math.max(0,Math.min(.5*a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.size))));return new mxPoint(a.x,a.y+f)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]},offPageConnector:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},
-function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0,G.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(ta.prototype.size,!1),cube:Ka(1,b.prototype.size,!1),card:Ka(.5,m.prototype.size,!0),loopLimit:Ka(.5,Q.prototype.size,!0),trapezoid:Ma(.5,q.prototype.size,q.prototype.fixedSize),parallelogram:Ma(1,v.prototype.size,v.prototype.fixedSize)};Graph.createHandle=
-U;Graph.handleFactory=Ha;var Va=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Va.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
-Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,u=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==u&&null!=c&&(u=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,p=Ia.y,n=Ja.x,q=Ja.y,B="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=u){a=function(a,c,f){a-=k.x;var b=c-k.y;c=(q*a-n*b)/(m*q-p*n);a=(p*a-m*b)/(p*n-m*q);B?(f&&(k=new mxPoint(k.x+m*c,k.y+p*c),d.push(k)),k=new mxPoint(k.x+n*a,k.y+q*a)):(f&&(k=new mxPoint(k.x+n*a,k.y+q*a),d.push(k)),k=new mxPoint(k.x+m*c,k.y+p*c));d.push(k)};var k=u;null==b&&(b=new mxPoint(u.x+(g.x-u.x)/2,u.y+(g.y-u.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Wa.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};t.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*Math.tan(b),.5*f);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
-a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};A.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-b)));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var M=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(M.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
+this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ma=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxShape.call(this)}function q(){mxShape.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function g(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function t(){mxActor.call(this)}function p(){mxActor.call(this)}
+function x(){mxActor.call(this)}function C(){mxActor.call(this)}function z(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,z.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,z.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,z.prototype.close);this.originalQuadTo=this.canvas.quadTo;
+this.canvas.quadTo=mxUtils.bind(this,z.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,z.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,z.prototype.arcTo)}function D(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function B(){mxActor.call(this)}function E(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}
+function G(){mxCylinder.call(this)}function v(){mxShape.call(this)}function K(){mxShape.call(this)}function A(){mxEllipse.call(this)}function T(){mxShape.call(this)}function O(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function S(){mxShape.call(this)}function ga(){mxShape.call(this)}function ja(){mxShape.call(this)}function da(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function W(){mxCylinder.call(this)}function fa(){mxRectangleShape.call(this)}
+function ha(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function R(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function Ca(){mxActor.call(this)}function M(){mxActor.call(this)}function ma(){mxActor.call(this)}function aa(){mxActor.call(this)}
+function P(){mxActor.call(this)}function ia(){mxActor.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function na(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function pa(){mxActor.call(this)}function za(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,c,b,f,
+d,e,g,l,m,v){g+=m;var X=f.clone();f.x-=d*(2*g+m);f.y-=e*(2*g+m);d*=g+m;e*=g+m;return function(){a.ellipse(X.x-d-g,X.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,b,f,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-b));this.paintForeground(a,c,b,f,d)};a.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.state){var e=this.flipH,X=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=e,e=X,X=g;a.rotate(-this.getShapeRotation(),e,X,c+f/2,b+d/2);s=this.scale;c=this.bounds.x/s;b=this.bounds.y/s;f=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,
+c,b,f,d)}};a.prototype.paintTableForeground=function(a,c,b,f,d){var e=this.state.view.graph,X=e.getActualStartSize(this.state.cell),g=e.model.getChildCells(this.state.cell,!0);if(0<g.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<g.length;l++){var v=e.getCellGeometry(g[l]);null!=v&&(a.begin(),a.moveTo(c+X.x,b+v.y),a.lineTo(c+f-X.width,b+v.y),a.end(),a.stroke())}if(m)for(f=e.model.getChildCells(g[0],!0),
+l=1;l<f.length;l++)v=e.getCellGeometry(f[l]),null!=v&&(a.begin(),a.moveTo(c+v.x+X.x,b+X.y),a.lineTo(c+v.x+X.x,b+d-X.height),a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity",this.darkOpacity)))),X=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=X&&
+(a.setFillAlpha(Math.abs(X)),a.setFillColor(0>X?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(f,e),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var ta=Math.tan(mxUtils.toRadians(30)),
+ua=(.5-ta)/2;mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/ta);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ua);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ua)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+ta));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ua)*c),a.lineTo(c,.25*c),
+a.moveTo(.5*c,(.5-ua)*c),a.lineTo(.5*c,(1-ua)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ua),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ua)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,
+c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(n,mxCylinder);n.prototype.size=
+30;n.prototype.darkOpacity=0;n.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>
+g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",n);mxUtils.extend(u,mxShape);u.prototype.isoAngle=15;u.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,e=Math.min(f*Math.tan(e),.5*d);a.translate(c,b);a.begin();a.moveTo(.5*f,0);a.lineTo(f,
+e);a.lineTo(f,d-e);a.lineTo(.5*f,d);a.lineTo(0,d-e);a.lineTo(0,e);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,e);a.lineTo(.5*f,2*e);a.lineTo(f,e);a.moveTo(.5*f,2*e);a.lineTo(.5*f,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",u);mxUtils.extend(q,mxShape);q.prototype.size=15;q.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.translate(c,b);0==e?(a.rect(0,0,f,d),a.fillAndStroke()):
+(a.begin(),a.moveTo(0,e),a.arcTo(.5*f,e,0,0,1,.5*f,0),a.arcTo(.5*f,e,0,0,1,f,e),a.lineTo(f,d-e),a.arcTo(.5*f,e,0,0,1,.5*f,d),a.arcTo(.5*f,e,0,0,1,0,d-e),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(f,e),a.arcTo(.5*f,e,0,0,1,.5*f,2*e),a.arcTo(.5*f,e,0,0,1,0,e),a.stroke())};mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(c,mxActor);c.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,
+d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",c);mxUtils.extend(f,mxCylinder);f.prototype.tabWidth=60;f.prototype.tabHeight=20;f.prototype.tabPosition="right";f.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,
+b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",f);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(l,mxActor);l.prototype.size=.4;l.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,
+c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};l.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};
+mxCellRenderer.registerShape("tape",l);mxUtils.extend(m,mxActor);m.prototype.size=.3;m.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};m.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-
+1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",m);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,
+a.height*c),0,0)}return null};mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",t);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.fixedSize=20;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",
+C);z.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};z.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)};z.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};z.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,
+arguments);this.lastX=d;this.lastY=e};z.prototype.arcTo=function(a,c,b,f,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};z.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),l=this.defaultVariation;
+5>g&&(g=5,l/=3);for(var X=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/g,f=f/e,d=d/e,e=0;e<g;e++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,X*e+this.lastX-m*d,b*e+this.lastY-m*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};z.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 Qa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Qa.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Ra=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Ra.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new z(a,
+mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Sa=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"))&&Sa.apply(this,arguments)};var Ta=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle||a.handJiggle.constructor!=z)Ta.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
+a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,
+b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Wa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Wa.apply(this,arguments)};mxUtils.extend(D,mxRectangleShape);D.prototype.size=.1;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};D.prototype.paintForeground=function(a,
+c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",D);mxUtils.extend(I,mxRectangleShape);
+I.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};I.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable=function(){return!0};
+y.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",y);mxUtils.extend(B,mxActor);B.prototype.size=.2;B.prototype.fixedSize=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",
+this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",B);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};
+E.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,
+!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,b,f,d]))}};mxUtils.extend(H,
+mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};H.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],X=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(f+this.strokewidth,
+d+this.strokewidth),p+=x,t+=x);var x=c,A=b,x=l==mxConstants.ALIGN_CENTER?x+(f-v)/2:l==mxConstants.ALIGN_RIGHT?x+(f-v-p):x+p,A=m==mxConstants.ALIGN_MIDDLE?A+(d-X)/2:m==mxConstants.ALIGN_BOTTOM?A+(d-X-t):A+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,x,A,v,X);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",H);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,
+0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",
+v);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};K.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(T,mxShape);T.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",T);mxUtils.extend(O,mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=
+function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};O.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",O);mxUtils.extend(N,mxRectangleShape);N.prototype.size=40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};N.prototype.paintBackground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=N&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),
+a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};N.prototype.paintForeground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,
+"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,f,d),
+a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",
+J);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=N.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
+mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&
+(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",y.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=
+function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l+d),
+new mxPoint(g+m,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l)]):(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m,l),new mxPoint(g+m-d,l+v),new mxPoint(g,l+v),new mxPoint(g+d,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,f){var d="0"!=
+mxUtils.getValue(c.style,"fixedSize","0"),e=d?p.prototype.fixedSize:p.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,l+v),new mxPoint(g,l+v),new mxPoint(g+d,l)]):
+c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l),new mxPoint(g+m-d,l+v),new mxPoint(g+d,l+v),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l+d),new mxPoint(g+m,
+l+v-d),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?B.prototype.fixedSize:B.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height,p=
+a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+v),new mxPoint(g,l+v),new mxPoint(g+d,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+
+m,l),new mxPoint(g+m-d,a),new mxPoint(g+m,l+v),new mxPoint(g+d,l+v),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(p,l),new mxPoint(g+m,l+d),new mxPoint(g+m,l+v),new mxPoint(p,l+v-d),new mxPoint(g,l+v),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(p,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+v-d),new mxPoint(p,l+v),new mxPoint(g,
+l+v-d),new mxPoint(g,l)]);p=new mxPoint(p,a);f&&(b.x<g||b.x>g+m?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?E.prototype.fixedSize:E.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height,p=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(p,l),new mxPoint(g+m,l+d),new mxPoint(g+m,l+v-d),new mxPoint(p,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l+d),new mxPoint(p,l)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+v),new mxPoint(g+
+d,l+v),new mxPoint(g,a),new mxPoint(g+d,l)]);p=new mxPoint(p,a);f&&(b.x<g||b.x>g+m?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",
+S);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",
+ga);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ja);mxUtils.extend(da,mxShape);da.prototype.inset=2;da.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,
+0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",da);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=20;ba.prototype.jettyHeight=10;ba.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(c,d-c),m=Math.min(l+2*c,d-c);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,
+l+c),a.moveTo(b,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",ba);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=32;W.prototype.jettyHeight=12;W.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));
+c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",W);mxUtils.extend(fa,mxRectangleShape);
+fa.prototype.paintForeground=function(a,c,b,f,d){var e=f/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,b),new mxPoint(c+f,b+g),new mxPoint(c+e,b+d),new mxPoint(c,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",fa);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=
+function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",ha);mxUtils.extend(ka,ha);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",U);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=10;ea.prototype.defaultArrowWidth=20;ea.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ea.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",
+this.defaultArrowWidth)};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ea);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,e=Math.max(e,Math.min(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",L);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ca);mxUtils.extend(R,mxActor);
+R.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",R);mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
+"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",Y);mxUtils.extend(Z,mxActor);Z.prototype.arrowWidth=.3;Z.prototype.arrowSize=.2;Z.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",Z);mxUtils.extend(Ca,
+mxActor);Ca.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-
+c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Ca);mxUtils.extend(M,mxActor);M.prototype.size=.1;M.prototype.fixedSize=20;M.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);
+a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",M);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",ma);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
+aa);mxUtils.extend(P,mxActor);P.prototype.size=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
+P);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",
+ia);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);
+a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",sa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(na,mxRhombus);na.prototype.paintVertexShape=
+function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",na);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Da);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",wa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);
+if(null!=this.style){var e=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(c,b,f,d);a.fill();a.pointerEvents=e;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,b);"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b);"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d);"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,
+b+d);"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",xa);mxUtils.extend(ya,
+mxActor);ya.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,
+0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",pa);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};mxCellRenderer.registerShape("display",
+za);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,b){for(var f=[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
+mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
+a.moveTo(f.x-p/2-t/2,f.y-t/2+p/2);a.lineTo(f.x+t/2-3*p/2,f.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),x=f.x+p/2,A=f.y+t/2;f.x-=p;f.y-=t;return function(){a.begin();a.moveTo(x-p/2-t/2,A-t/2+p/2);a.lineTo(x-p/2+t/2,A-t/2-p/2);a.lineTo(x+t/2-3*p/2,A-3*t/2-p/2);a.lineTo(x-t/2-3*p/2,A-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
+a.moveTo(f.x-p/2-t/2,f.y-t/2+p/2);a.lineTo(f.x+t/2-3*p/2,f.y-3*t/2-p/2);a.moveTo(f.x-p/2+t/2,f.y-t/2-p/2);a.lineTo(f.x-t/2-3*p/2,f.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,l,m,v){var p=f.clone(),t=Aa.apply(this,arguments),x=d*(g+2*m),A=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*x+d*m,p.y-2*A+e*m);a.moveTo(p.x-x-A+e*m,p.y-A+x-d*m);a.lineTo(p.x+A-x-e*m,p.y-A-x+d*m);a.stroke()}});
+mxMarker.addMarker("halfCircle",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),x=f.clone();f.x-=p;f.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+p);a.quadTo(f.x-t,f.y+p,f.x,f.y);a.quadTo(f.x+t,f.y-p,x.x+t,x.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,g,l,m,v){c=d*m*1.118;b=e*m*1.118;d*=g+m;e*=g+m;var p=f.clone();p.x-=c;p.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
+a.lineTo(p.x-d,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,g,l,m,v,p){e*=l+v;g*=l+v;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,b){return Fa(a,["width"],c,function(c,f,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*g/2,e.y+
+d*c/4-f*g/2)},function(c,f,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},Fa=function(a,c,b,f,d){return V(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-l.x,m=d.y-l.y,v=Math.sqrt(e*e+m*m),l=f.call(this,v,e/v,m/v,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,f,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var m=a.view.scale,v=b?g[0]:
+g[l],g=b?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);f.x=(f.x+c.x)*m;f.y=(f.y+c.y)*m;d.call(this,t,l/t,p/t,v,g,f,e)})},Ba=function(a){return function(c){return[V(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Z.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",Z.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=
+Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},La=function(a,c,b){return function(f){var d=[V(f,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)},!1)];b&&mxUtils.getValue(f.style,
+mxConstants.STYLE_ROUNDED,!1)&&d.push(va(f));return d}},Ga=function(a,c,b,f,d){b=null!=b?b:.5;return function(e){var g=[V(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));
+this.state.style.size=a},!1,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Ma=function(a,c,b){a=null!=a?a:.5;return function(f){var d=[V(f,["size"],function(f){var d=null!=b?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?b:c)));return new mxPoint(f.x+Math.min(.75*f.width*a,e*(d?.75:.75*f.width)),f.y+f.height/4)},function(c,f){var d=null!=b&&"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?f.x-c.x:Math.max(0,Math.min(a,(f.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(f));return d}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return V(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,
+2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},V=function(a,c,b,f,d,e,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var b=0;b<c.length;b++)this.copyStyle(c[b]);g&&g(a)};l.getPosition=b;l.setPosition=f;l.ignoreGrid=null!=d?d:!0;if(e){var m=l.positionChanged;l.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);
+a.view.validate()}}return l},Ha={link:function(a){return[Pa(a,!0,10),Pa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||
+Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*
+a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=
+a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,
+b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;
+a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
+c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,b/2))}c.push(V(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
+c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var b=c.getSwimlaneDirection(a.style),f=c.model.getParent(a.cell),
+f=c.model.getChildCells(f,!0),d=[],e=0;e<f.length;e++)f[e]!=a.cell&&c.isSwimlane(f[e])&&c.getSwimlaneDirection(c.getCurrentCellStyle(f[e]))==b&&d.push(f[e]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,
+Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[V(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[V(a,
+["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",n.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];
+mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},dataStorage:function(a){return[V(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),b=parseFloat(mxUtils.getValue(this.state.style,"size",c?M.prototype.fixedSize:M.prototype.size));return new mxPoint(a.x+a.width-b*(c?1:a.width),a.getCenterY())},function(a,c){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,
+(a.x+a.width-c.x)/a.width));this.state.style.size=b},!1)]},callout:function(a){var c=[V(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=
+Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))},!1)];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[V(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ba.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",ba.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*b)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=
+Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},tee:function(a){return[V(a,
+["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:Ba(1),doubleArrow:Ba(.5),folder:function(a){return[V(a,["tabWidth",
+"tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",f.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",f.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",f.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",f.prototype.tabPosition)==
+mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],
+function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[V(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",u.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,
+c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(.5*a.height,parseFloat(mxUtils.getValue(this.state.style,"size",q.size))));return new mxPoint(a.x,a.y+c)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]},offPageConnector:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(B.prototype.size,!0,null,!0,B.prototype.fixedSize),hexagon:Ga(E.prototype.size,!0,.5,!0,E.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(za.prototype.size,!1),cube:La(1,b.prototype.size,!1),card:La(.5,g.prototype.size,!0),loopLimit:La(.5,P.prototype.size,!0),trapezoid:Ma(.5,p.prototype.size,p.prototype.fixedSize),parallelogram:Ma(1,t.prototype.size,t.prototype.fixedSize)};
+Graph.createHandle=V;Graph.handleFactory=Ha;var Ua=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ua.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),Ba=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
+Math.cos(Ba),Math.sin(Ba)),Ba=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(Ba),Math.sin(Ba));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow",
+"horizontal");if(null!=g&&null!=l){a=function(a,c,b){a-=A.x;var f=c-A.y;c=(t*a-p*f)/(m*t-v*p);a=(v*a-m*f)/(v*p-m*t);x?(b&&(A=new mxPoint(A.x+m*c,A.y+v*c),d.push(A)),A=new mxPoint(A.x+p*a,A.y+t*a)):(b&&(A=new mxPoint(A.x+p*a,A.y+t*a),d.push(A)),A=new mxPoint(A.x+m*c,A.y+v*c));d.push(A)};var A=l;null==f&&(f=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(f.x,f.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Va=Graph.prototype.createEdgeHandler;
+Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Va.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c+f,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,f=Math.min(c*Math.tan(f),.5*b);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
+a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));return a};y.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(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))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};m.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};b.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-b)));return a};g.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c-b),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ga.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=
-mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(c,f/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,f));return a};T.prototype.getConstraints=function(a,c,f){c=parseFloat(mxUtils.getValue(a,"jettyWidth",T.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",T.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-
-.5*a,3.5*a))];f>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));f>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));f>15*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};Q.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),
-new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];u.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+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))];ra.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};b.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a};f.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};L.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;
+la.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*
+c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));return a};ba.prototype.getConstraints=function(a,c,b){c=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",ba.prototype.jettyHeight));var f=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),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(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-
+.5*a,3.5*a))];b>5*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));b>8*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));b>15*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return f};P.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),
+new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];W.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)];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)];p.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)];C.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,
+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)];c.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)];l.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)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];S.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)];v.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;n.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;ca.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,
-Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,.75*c+.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),
-!1,null,.5*(c-b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};O.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),
-!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};X.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)];ja.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));return a};M.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",ja.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ja.prototype.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),
-!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};xa.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(f,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(f-d)/2,e=b+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};H.prototype.constraints=null;Y.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)];da.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)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.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)];t.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(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;Y.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,
+Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};ca.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};Ca.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),
+!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};pa.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};N.prototype.constraints=null;ma.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)];aa.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)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),a);null!=a&&d.setSelectionCells(a)}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey=
-"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,f){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+
+"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(b.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+
"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,
-300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(c){b.handleError(c)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,p=d.view.scale,n=e.x,k=e.y,e=null;if(1==c.length&&a){var q=d.getCellGeometry(c[0]);
-null!=q&&(e=q.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var l=Math.round(d.snap(d.popupMenuHandler.triggerX/p-n)),y=Math.round(d.snap(d.popupMenuHandler.triggerY/p-k));d.cellsMoved(c,l-e.x,y-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
-this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(a=0;a<c.length;a++)if(d.getModel().isVertex(c[a])){var e=d.getCellGeometry(c[a]);null!=e&&(e=e.clone(),e.width=b.copiedSize.width,e.height=b.copiedSize.height,d.getModel().setGeometry(c[a],e))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(c){a(null!=c&&mxEvent.isShiftDown(c))},null,null,"Delete");
-this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(c){b.handleError(c)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
+300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(q){b.handleError(q)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,l=d.view.scale,m=e.x,t=e.y,e=null;if(1==c.length&&a){var p=d.getCellGeometry(c[0]);
+null!=p&&(e=p.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var x=Math.round(d.snap(d.popupMenuHandler.triggerX/l-m)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/l-t));d.cellsMoved(c,x-e.x,k-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(a=0;a<c.length;a++)if(d.getModel().isVertex(c[a])){var f=d.getCellGeometry(c[a]);null!=f&&(f=f.clone(),f.width=b.copiedSize.width,f.height=b.copiedSize.height,d.getModel().setGeometry(c[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(q){b.handleError(q)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},
null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,
-0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCells();d.model.beginUpdate();try{var f=d.ungroupCells();if(null!=a)for(var b=0;b<a.length;b++)d.model.contains(a[b])&&(0==d.model.getChildCount(a[b])&&d.model.isVertex(a[b])&&d.setCellStyles("container","0",[a[b]]),f.push(a[b]))}finally{d.model.endUpdate()}d.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});
-this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),f="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");null!=e&&(f=e)}f=new TextareaDialog(b,mxResources.get("editTooltip")+":",f,function(c){d.setTooltipForCell(a,
-c)});b.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),f=d.getLinkForCell(a)||"";b.showLinkDialog(f,mxResources.get("apply"),function(c){c=mxUtils.trim(c);d.setLinkForCell(a,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
-"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,f){a=mxUtils.trim(a);if(0<a.length){var c=null,b=d.getLinkTitle(a);null!=f&&0<f.length&&(c=f[0].iconUrl,b=f[0].name||f[0].type,b=b.charAt(0).toUpperCase()+b.substring(1),30<b.length&&
-(b=b.substring(0,30)+"..."));c=new mxCell(b,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;b=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([c],!0));c.geometry.x=b.x;c.geometry.y=b.y;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);
-d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var a=d.getSelectedElement(),f=d.getParentByName(a,"A",d.cellEditor.textarea),e="";if(null==f&&null!=a&&null!=a.getElementsByTagName)for(var m=a.getElementsByTagName("a"),p=0;p<m.length&&null==f;p++)m[p].textContent==a.textContent&&(f=m[p]);null!=f&&"A"==f.nodeName&&(e=f.getAttribute("href")||"",d.selectNode(f));var n=d.cellEditor.saveSelection();
-b.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(a){d.cellEditor.restoreSelection(n);null!=a&&d.insertLink(a)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),p=d.getCellGeometry(b);d.getModel().isVertex(b)&&
-null!=e&&null!=e.text&&null!=p&&d.isWrapping(b)?(p=p.clone(),p.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,p)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),e=0;e<f.length;e++)if(state=d.getView().getState(f[e]),
-null!=state){var m=mxUtils.getValue(state.style,"html","0");if("1"==m&&null==a){var p=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(p=p.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=d.sanitizeHtml(p);p=mxUtils.extractTextWithWhitespace(n.childNodes);d.cellLabelChanged(state.cell,p);d.setCellStyles("html",a,[f[e]])}else"0"==m&&"1"==a&&(p=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,
-"nl2Br","1")&&(p=p.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(p)),d.setCellStyles("html",a,[f[e]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),f="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",
-function(){var a="0",f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?
-d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),f=d.view.translate,e=d.view.scale;a.x=a.x/e-f.x;a.y=a.y/e-f.y;a.width/=e;a.height/=e;null!=d.backgroundImage&&
-a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),b.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
-a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
+0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCells();d.model.beginUpdate();try{var c=d.ungroupCells();if(null!=a)for(var b=0;b<a.length;b++)d.model.contains(a[b])&&(0==d.model.getChildCount(a[b])&&d.model.isVertex(a[b])&&d.setCellStyles("container","0",[a[b]]),c.push(a[b]))}finally{d.model.endUpdate()}d.setSelectionCells(c)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});
+this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),c="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){d.setTooltipForCell(a,
+c)});b.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),c=d.getLinkForCell(a)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);d.setLinkForCell(a,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var b=null,e=d.getLinkTitle(a);null!=c&&0<c.length&&(b=c[0].iconUrl,e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&
+(e=e.substring(0,30)+"..."));b=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=b?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+b:"spacing=10;"));b.vertex=!0;e=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));b.geometry.x=e.x;b.geometry.y=e.y;d.setLinkForCell(b,a);d.cellSizeUpdated(b,!0);d.getModel().beginUpdate();try{b=d.addCell(b),d.fireEvent(new mxEventObject("cellsInserted","cells",[b]))}finally{d.getModel().endUpdate()}d.setSelectionCell(b);
+d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var a=d.getSelectedElement(),c=d.getParentByName(a,"A",d.cellEditor.textarea),f="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var e=a.getElementsByTagName("a"),l=0;l<e.length&&null==c;l++)e[l].textContent==a.textContent&&(c=e[l]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"",d.selectNode(c));var m=d.cellEditor.saveSelection();
+b.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(a){d.cellEditor.restoreSelection(m);null!=a&&d.insertLink(a)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),l=d.getCellGeometry(b);d.getModel().isVertex(b)&&
+null!=e&&null!=e.text&&null!=l&&d.isWrapping(b)?(l=l.clone(),l.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,l)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),f=0;f<c.length;f++)if(state=d.getView().getState(c[f]),
+null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==a){var l=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var m=document.createElement("div");m.innerHTML=d.sanitizeHtml(l);l=mxUtils.extractTextWithWhitespace(m.childNodes);d.cellLabelChanged(state.cell,l);d.setCellStyles("html",a,[c[f]])}else"0"==e&&"1"==a&&(l=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,
+"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(l)),d.setCellStyles("html",a,[c[f]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),c="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
+function(){var a="0",c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?
+d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),c=d.view.translate,f=d.view.scale;a.x=a.x/f-c.x;a.y=a.y/f-c.y;a.width/=f;a.height/=f;null!=d.backgroundImage&&
+a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),b.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
+a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",
-mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
-b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
-l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var t=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){t||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){t=!1}),t=!0)}));l=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,
-function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
-a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});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(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
+parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);
+n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);
+n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",
+mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
+b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
+n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(a,c,b,e){return this.addAction(a,
+function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c,a);(c&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(c&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
+a.nodeName&&d.replaceElement(a)}):(c&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var f=0;f<a.length;f++)0==d.model.getChildCount(a[f])&&d.autoSizeCell(a[f],!1)}finally{d.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(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",
function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),f=d.getCurrentCellStyle(a[0]),e="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
-function(){var a=d.view.getState(d.getSelectionCell()),f="1";null!=a&&null!=d.getFoldingImage(a)&&(f="0");d.setCellStyles("collapsible",f);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var f=d.getModel(),f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
-a)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var f=
-e.graph.selectionCellsHandler.getHandler(a);if(f instanceof mxEdgeHandler){for(var b=d.view.translate,m=d.view.scale,p=b.x,b=b.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)p+=n.x,b+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);p=Math.round(d.snap(d.popupMenuHandler.triggerX/m-p));m=Math.round(d.snap(d.popupMenuHandler.triggerY/m-b));f.addPointAt(f.state,p,m)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
-a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
-document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");l=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+
-" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),e="";null!=f&&(e=f.style[mxConstants.STYLE_IMAGE]||e);var m=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,c,f){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(m),d.insertImage(a,c,f);else{var b=d.getSelectionCells();if(null!=a&&(0<a.length||0<b.length)){var e=null;d.getModel().beginUpdate();try{if(0==b.length){var b=[d.insertVertex(d.getDefaultParent(),null,"",0,0,c,f,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],
-g=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(b,!0));b[0].geometry.x=g.x;b[0].geometry.y=g.y;e=b;d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,b);var p=d.getCurrentCellStyle(b[0]);"image"!=p[mxConstants.STYLE_SHAPE]&&"label"!=p[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",b):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,b);if(1==d.getSelectionCount()&&null!=c&&null!=f){var n=b[0],
-k=d.getModel().getGeometry(n);null!=k&&(k=k.clone(),k.width=c,k.height=f,d.getModel().setGeometry(n,k))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),
-this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.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(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
-Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.getCurrentCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
+function(){var a=d.view.getState(d.getSelectionCell()),c="1";null!=a&&null!=d.getFoldingImage(a)&&(c="0");d.setCellStyles("collapsible",c);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var c=d.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
+a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var c=
+e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,g=d.view.scale,l=b.x,b=b.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)l+=m.x,b+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);l=Math.round(d.snap(d.popupMenuHandler.triggerX/g-l));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-b));c.addPointAt(c.state,l,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
+a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
+document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");n=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+
+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),f="";null!=c&&(f=c.style[mxConstants.STYLE_IMAGE]||f);var e=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(e),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;d.getModel().beginUpdate();try{if(0==f.length){var f=[d.insertVertex(d.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],
+l=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;g=f;d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var m=d.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var t=f[0],
+k=d.getModel().getGeometry(t);null!=k&&(k=k.clone(),k.width=c,k.height=b,d.getModel().setGeometry(t,k))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),
+this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.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(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),
+this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
+Actions.prototype.addAction=function(a,b,e,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.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.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.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(l){null!=b&&b(l)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var l=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(l,this.ui.pages):null;var c=[this.ui.diffPages(null!=d?d:l,this.shadowPages)];if(!this.ignorePatches(c)){var f=this.ui.patchPages(l,
-c[0]);d={};var g=this.ui.getHashValueForPages(f,d),l={},m=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",m==g,g);if(null!=g&&g!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,c,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(l)+"\nFrom: "+v+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,D)}}catch(z){}}};
+DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(n){null!=b&&b(n)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),u=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=u&&0<u.length){this.shadowPages=u;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var q=[this.ui.diffPages(null!=d?d:n,this.shadowPages)];if(!this.ignorePatches(q)){var c=this.ui.patchPages(n,
+q[0]);d={};var f=this.ui.getHashValueForPages(c,d),n={},g=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",q,"checksum",g==f,f);if(null!=f&&f!=g){var l=this.compressReportData(this.getAnonymizedXmlForPages(u)),m=this.compressReportData(this.getAnonymizedXmlForPages(c)),t=this.ui.hashValue(a.getCurrentEtag()),p=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,q,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+t+"\nTo: "+p+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+m,null,"mergeFile");return}this.patch(q,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(z);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),C=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),C,z)}}catch(D){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var l=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?l(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?l(a):l(null)}),function(){})}else{var t=this.getCurrentUser(),c=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),l=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),c=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf("."),t="xml";0<m&&(t=g.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+c+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+l,d)}catch(n){}};
-DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),l=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(l,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
+DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var n=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}else{var u=this.getCurrentUser(),q=null!=u?u.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(c){}}}catch(c){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),q=null!=u?this.ui.hashValue(u.id):"unknown",c=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",f=this.getTitle(),g=f.lastIndexOf("."),u="xml";0<g&&(u=f.substring(g));var l=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+q+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!=b?"\n\n"+b:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+k+"\n\nData:\n"+n,d)}catch(m){}};
+DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var t=this.changeListenerEnabled;this.changeListenerEnabled=!1;var c=l.foldingEnabled,f=l.mathEnabled,g=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};l.model.beginUpdate();try{for(var m=
-0;m<a.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[m],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.container.style.visibility="";l.model.endUpdate();l.cellRenderer.redraw=g;this.changeListenerEnabled=t;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)f!=
-l.mathEnabled?(this.ui.editor.updateGraphComponents(),l.refresh()):(c!=l.foldingEnabled?l.view.revalidate():l.view.validate(),l.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,b,e,d,k,l){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var u=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=n.foldingEnabled,c=n.mathEnabled,f=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());f.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.container.style.visibility="";n.model.endUpdate();n.cellRenderer.redraw=f;this.changeListenerEnabled=u;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=
+n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(q!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,b,e,d,k,n){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=e)e(u);else throw u;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3022,25 +3022,25 @@ window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources.
k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(a);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),l=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,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,l):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),n=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,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(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(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&
(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var b=Editor.guid(32);null!=this.sync?this.sync.createToken(b,mxUtils.bind(this,function(e){a(b,e)}),mxUtils.bind(this,function(){a(b)})):a(b)};
-DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(c){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var l=
-this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,c)}}catch(f){}}};
+DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(q){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,q);else{var n=
+this.getCurrentUser(),u=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),u,q)}}catch(c){}}};
DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d,k,l){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=l};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d,k,n){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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 null==this.fileHandle};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,b){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,b)};
-LocalFile.prototype.saveFile=function(a,b,e,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);b=this.getData();var t=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),c=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var b=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.desc.lastModified==f.lastModified?a.write(l?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;t()}),b)}),b)}),b):(this.inConflictState=!0,b())}),b)}),b)}}else{if(this.ui.isOfflineApp()||
-this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,l?"image/png":"text/xml",l);else if(c.length<MAX_REQUEST_SIZE){var f=a.lastIndexOf("."),f=0<f?a.substring(f+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(l?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));t()}});l?(k=this.ui.getPngFileProperties(this.ui.fileNode),
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(a)}),d,this.ui.getCurrentFile()!=this?b:null,k.scale,k.border)):c(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",
+LocalFile.prototype.saveFile=function(a,b,e,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);b=this.getData();var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var b=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.desc.lastModified==f.lastModified?a.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;u()}),b)}),b)}),b):(this.inConflictState=!0,b())}),b)}),b)}}else{if(this.ui.isOfflineApp()||
+this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));u()}});n?(k=this.ui.getPngFileProperties(this.ui.fileNode),
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){q(a)}),d,this.ui.getCurrentFile()!=this?b:null,k.scale,k.border)):q(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"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"}},
@@ -3080,8 +3080,8 @@ c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(
null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,c){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var f=0;f<b.length;f++){var d=b[f];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,f){var d=a.state.strokeColor,e=a.state.strokeWidth,g=a.state.strokeAlpha,u=a.state.dashed,m=f.fillWeight;
-0>m&&(m=f.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(f.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(c,b,f);a.setDashed(u);a.setStrokeWidth(e);a.setStrokeColor(d);a.setStrokeAlpha(g)};c._drawToContext=function(a,c,b){a.begin();for(var f=0;f<c.ops.length;f++){var d=c.ops[f],e=d.data;switch(d.op){case "move":a.moveTo(e[0],e[1]);break;case "bcurveTo":a.curveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case "lineTo":a.lineTo(e[0],e[1])}}a.end();"fillPath"===c.type&&
+Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var f=0;f<b.length;f++){var d=b[f];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,f){var d=a.state.strokeColor,e=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(f.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(c,b,f);a.setDashed(l);a.setStrokeWidth(e);a.setStrokeColor(d);a.setStrokeAlpha(g)};c._drawToContext=function(a,c,b){a.begin();for(var f=0;f<c.ops.length;f++){var d=c.ops[f],e=d.data;switch(d.op){case "move":a.moveTo(e[0],e[1]);break;case "bcurveTo":a.curveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case "lineTo":a.lineTo(e[0],e[1])}}a.end();"fillPath"===c.type&&
b.filled?a.fill():a.stroke()};return c};(function(){function a(c,b,f){this.canvas=c;this.rc=b;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
@@ -3091,9 +3091,9 @@ d=null;(b.filled=c)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.
e);e=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==e?-1:e;e=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==e&&(e=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",e=null!=b.fill&&(null!=d||null!=e&&b.fill.toLowerCase()==e.toLowerCase())?"solid":f.fillStyle);b.fillStyle=e;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,c),this.lastX=a,this.lastY=c)};a.prototype.moveTo=
function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,f),this.lastX=b,this.lastY=f)};a.prototype.curveTo=function(a,c,b,f,d,e){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,f,d,e),this.lastX=d,this.lastY=e)};a.prototype.arcTo=function(a,c,b,f,d,e,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,f,d,e,g);if(null!=m)for(var u=0;u<m.length;u+=6)this.curveTo(m[u],m[u+1],m[u+2],m[u+3],m[u+4],m[u+5]);this.lastX=e;this.lastY=g}};a.prototype.rect=function(a,c,b,f){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,f,d,e),this.lastX=d,this.lastY=e)};a.prototype.arcTo=function(a,c,b,f,d,e,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,f,d,e,g);if(null!=l)for(var m=0;m<l.length;m+=6)this.curveTo(l[m],l[m+1],l[m+2],l[m+3],l[m+4],l[m+5]);this.lastX=e;this.lastY=g}};a.prototype.rect=function(a,c,b,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,f,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+f/2,b,f,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,f,d,e){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+e),this.lineTo(a+
-b,c+f-e),this.quadTo(a+b,c+f,a+b-d,c+f),this.lineTo(a+d,c+f),this.quadTo(a,c+f,a,c+f-e),this.lineTo(a,c+e),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(H){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+b,c+f-e),this.quadTo(a+b,c+f,a+b-d,c+f),this.lineTo(a+d,c+f),this.quadTo(a,c+f,a,c+f-e),this.lineTo(a,c+e),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(N){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new a(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
@@ -3102,10 +3102,10 @@ f||(c.save(),f=this.fill,d=this.stroke,this.stroke=this.fill=null,c.handJiggle.p
a&&"undefined"!==typeof pako){var f=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=f&&0<f.length)for(var e=0;e<f.length;e++)if("mxgraph"==f[e].getAttribute("class")){d.push(f[e]);break}0<d.length&&(f=d[0].getAttribute("data-mxgraph"),null!=f?(d=JSON.parse(f),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(f=mxUtils.getTextContent(d[0]),f=Graph.decompress(f,null,b),0<f.length&&(a=mxUtils.parseXml(f),a=a.documentElement))))}if(null!=
a&&"svg"==a.nodeName)if(f=a.getAttribute("content"),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)a=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(f=a.getElementsByTagName("diagram"),0<f.length&&(d=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=
d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),f=null;0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(f=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(b[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),
-b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var m=a.charCodeAt(d),d=d+1;10!=m&&(b+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var u=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(u>d){c=a.substring(d,u);break}}10==m&&("endobj"==
+b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var m=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(m>d){c=a.substring(d,m);break}}10==l&&("endobj"==
b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==c&&(c=Editor.extractGraphModelFromXref(e));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&
(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&
-(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(S){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));
+(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(O){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));
return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,c){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=c)}};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=
a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=
a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];
@@ -3117,9 +3117,9 @@ c.parentNode){var b=document.createElement("style");b.setAttribute("type","text/
null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||
"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
-c.getAttribute("shadow"),!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(S){console.log("ExtFonts format error: "+S.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
+c.getAttribute("shadow"),!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(O){console.log("ExtFonts format error: "+O.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var f=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",
-f.join("|"))}return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(P){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this,
+f.join("|"))}return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this,
arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{jax:["input/TeX","input/MathML","input/AsciiMath"].concat(["html"==urlParams["math-output"]?"output/HTML-CSS":"output/SVG"]),extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},"HTML-CSS":{availableFonts:[b],imageFont:null},SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
@@ -3128,30 +3128,30 @@ function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.b
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=Editor.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,
19)||mxClient.IS_CHROMEAPP||(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){try{var b=!0,f=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(f);b&&c(Editor.createSvgDataUri(a.getText()))}),
-function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(f);if(b)try{var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(ea){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(H){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var m=a.getElementsByTagName(b),p=0;p<m.length;p++)mxUtils.bind(this,function(b){try{if(null!=b){var m=f.convert(b.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var p=e[m];null==p?(d++,this.convertImageToDataUri(m,function(f){null!=f&&(e[m]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,p)}else null!=m&&b.setAttribute(g,m)}}catch(la){}})(m[p])});b("image","xlink:href");
+function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(f);if(b)try{var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(S){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(N){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),m=0;m<l.length;m++)mxUtils.bind(this,function(b){try{if(null!=b){var l=f.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var m=e[l];null==m?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(e[l]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,m)}else null!=l&&b.setAttribute(g,l)}}catch(fa){}})(l[m])});b("image","xlink:href");
b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};
-Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,m){try{var p=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+Editor.base64Encode(f)}c(f)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},p,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},m)});n()}catch(W){null!=b&&b(W)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,l){try{var m=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+Editor.base64Encode(f)}c(f)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},m,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(da){null!=b&&b(da)}};Editor.prototype.absoluteCssFonts=
function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var f=null!=a?a.lastIndexOf("/"):-1;0<=f&&(a=a.substring(0,f+1));var f=document.getElementsByTagName("base"),d=null;null!=f&&0<f.length&&(d=f[0].getAttribute("href"));for(var e=1;e<b.length;e++)if(f=b[e].indexOf(")"),0<f){var g=Editor.trimCssUrl(b[e].substring(0,f));this.graph.isRelativeUrl(g)&&(g=null!=d?d+g:window.location.protocol+"//"+window.location.hostname+("/"==g.charAt(0)?"":a)+g);
c.push('url("'+g+'"'+b[e].substring(f))}else c.push(b[e])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==f){for(var a=[b[0]],d=1;d<b.length;d++){var e=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,e))]);a.push('"'+b[d].substring(e))}c(a.join(""))}});if(0<b.length){for(var e=1;e<b.length;e++){var g=b[e].indexOf(")"),
-m=null,p=b[e].indexOf("format(",g);0<p&&(m=Editor.trimCssUrl(b[e].substring(p+7,b[e].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;f++;var c="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
-else if("eot"==m||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;f--;d()}),mxUtils.bind(this,function(a){f--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[e].substring(0,g)),m)}d()}else c(a)};Editor.prototype.loadFonts=
+l=null,m=b[e].indexOf("format(",g);0<m&&(l=Editor.trimCssUrl(b[e].substring(m+7,b[e].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;f++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
+else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;f--;d()}),mxUtils.bind(this,function(a){f--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[e].substring(0,g)),l)}d()}else c(a)};Editor.prototype.loadFonts=
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.extFonts;if(null!=c&&0<c.length){var b="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(b,a)}),e=0;e<c.length;e++)mxUtils.bind(this,function(a,c){0==c.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[c]?
(f++,this.loadUrl(c,mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;f--;d()}),mxUtils.bind(this,function(a){f--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'");}'})(c[e].name,c[e].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var b=a.getElementsByTagName("defs"),f=a.ownerDocument;0==b.length?(b=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,c);b.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,m,p,n,q,k,v,l,x,y){try{e=null!=e?e:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;v=null!=v?v:0;var u=p?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=f);null==u&&0==p&&(u=y?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,v,l,null,g,null,null,null,n,null,y),mxUtils.bind(this,function(b){try{var f=new Image;
-f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){l.drawImage(f,0,0);a(p)},0):(l.drawImage(f,0,0),a(p))},p=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));m=null!=m?m:1;null!=c&&(m=e?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(m*n);q=Math.ceil(m*q);p.setAttribute("width",n);p.setAttribute("height",q);var l=p.getContext("2d");null!=u&&(l.beginPath(),l.rect(0,0,n,q),l.fillStyle=u,
-l.fill());l.scale(m,m);if(x){var y=k.view,B=y.scale;y.scale=1;var A=btoa(unescape(encodeURIComponent(y.createSvgGrid(y.gridColor))));y.scale=B;var A="data:image/svg+xml;base64,"+A,t=k.gridSize*y.gridSteps*m,z=k.getGraphBounds(),D=y.translate.x*B,J=y.translate.y*B,H=D+(z.x-D)/B-v,C=J+(z.y-J)/B-v,E=new Image;E.onload=function(){try{for(var a=-Math.round(t-mxUtils.mod((D-H)*m,t)),c=-Math.round(t-mxUtils.mod((J-C)*m,t));a<n;a+=t)for(var b=c;b<q;b+=t)l.drawImage(E,a/m,b/m);g()}catch(sa){null!=d&&d(sa)}};
-E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(ra){null!=d&&d(ra)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(O){null!=d&&d(O)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(X){null!=d&&d(X)}}))}catch(O){null!=
-d&&d(O)}}),b,q)}catch(R){null!=d&&d(R)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var l=k,t=0;8>t;t++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[k]=l;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=p;p+=c;return a.substring(b,p)}
-function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,p);do{var n=g(a);if("IDAT"==e(a,4)){d=a.substring(0,p-8);"pHYs"==c&&"dpi"==
-b?(b=Math.round(f/.0254),b=m(b)+m(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=m(b.length)+c+b+m(f^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
-var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&
-(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var 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 a=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=
-!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=n.apply(this,arguments);var c=this.editorUi,
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,l,m,p,t,x,k,n,z,y){try{e=null!=e?e:!0;g=null!=g?g:!0;x=null!=x?x:this.graph;k=null!=k?k:0;var v=m?null:x.background;v==mxConstants.NONE&&(v=null);null==v&&(v=f);null==v&&0==m&&(v=y?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(x.getSvg(null,null,k,n,null,g,null,null,null,p,null,y),mxUtils.bind(this,function(b){try{var f=new Image;
+f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){n.drawImage(f,0,0);a(m)},0):(n.drawImage(f,0,0),a(m))},m=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),t=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4*t),c/p)):c/p);p=Math.ceil(l*p);t=Math.ceil(l*t);m.setAttribute("width",p);m.setAttribute("height",t);var n=m.getContext("2d");null!=v&&(n.beginPath(),n.rect(0,0,p,t),n.fillStyle=v,
+n.fill());n.scale(l,l);if(z){var A=x.view,y=A.scale;A.scale=1;var C=btoa(unescape(encodeURIComponent(A.createSvgGrid(A.gridColor))));A.scale=y;var C="data:image/svg+xml;base64,"+C,B=x.gridSize*A.gridSteps*l,q=x.getGraphBounds(),u=A.translate.x*y,K=A.translate.y*y,D=u+(q.x-u)/y-k,J=K+(q.y-K)/y-k,N=new Image;N.onload=function(){try{for(var a=-Math.round(B-mxUtils.mod((u-D)*l,B)),c=-Math.round(B-mxUtils.mod((K-J)*l,B));a<p;a+=B)for(var b=c;b<t;b+=B)n.drawImage(N,a/l,b/l);g()}catch(ya){null!=d&&d(ya)}};
+N.onerror=function(a){null!=d&&d(a)};N.src=C}else g()}catch(wa){null!=d&&d(wa)}});f.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ca){null!=d&&d(ca)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(R){null!=d&&d(R)}}))}catch(ca){null!=
+d&&d(ca)}}),b,t)}catch(ea){null!=d&&d(ea)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var n=k,u=0;8>u;u++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[k]=n;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=m;m+=c;return a.substring(b,
+m)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,m);do{var p=g(a);if("IDAT"==e(a,4)){d=a.substring(0,m-8);"pHYs"==c&&
+"dpi"==b?(b=Math.round(f/.0254),b=l(b)+l(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(m-8,a.length);break}d+=a.substring(m-8,m-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+var q=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){q.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(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&
+(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var f=Format.prototype.init;Format.prototype.init=function(){f.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 a=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=
+!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var m=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=m.apply(this,arguments);var c=this.editorUi,
b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
@@ -3177,57 +3177,57 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=
0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,f=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],
-c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
-c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
-function(a,c,b){function f(a,c,b,f){u.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],m=b.parentRow.nextSibling;m&&m.getAttribute("data-pName")==a;)g.push(m.getAttribute("data-pValue")),m=m.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(u.setCellStyles(b.countProperty,g.length,u.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}u.setCellStyles(a,
-c,u.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var p=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var k=n.length;k<c;k++)n.push(p);n=n.join(",");u.setCellStyles(b.dependentProps[a],n,u.getSelectionCells());d.push(b.dependentProps[a]);e.push(n)}if("function"==typeof b.onChange)b.onChange(u,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}
-function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,
-function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,m){null!=c&&(c=c.split(","),k.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var p=g,q=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==
-a)p=p.nextSibling,q++;else break;var u={type:b,parentRow:g,index:q,isDeletable:!0,defVal:d,countProperty:e},q=n(a,"",u,0==q%2,m);f(a,d,u);p.parentNode.insertBefore(q,p.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function m(a,c,b,f,d,e,g){if(0<d){var m=Array(d);c=null!=c?c.split(","):[];for(var p=0;p<d;p++)m[p]=null!=c[p]?c[p]:null!=f?f:"";k.push({name:a,values:m,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
-function p(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function n(c,b,n,u,k){var v=n.dispName,l=n.type,x=document.createElement("tr");x.className="gePropRow"+(k?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);u=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",u=!0);var y=document.createElement("td");
-y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));u&&(y.style.textAlign="right");x.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==l)y.appendChild(e(c,b,n));else if("bool"==l||"boolean"==l)y.appendChild(p(c,b,n));else if("enum"==l){var B=n.enumList;for(k=0;k<B.length;k++)if(v=B[k],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var e=
-document.createElement("select");d(y,e);for(var g=0;g<B.length;g++){var m=B[g],p=document.createElement("option");p.value=mxUtils.htmlEntities(m.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));e.appendChild(p)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==l?y.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,
-x,k)):"staticArr"==l?y.appendChild(m(c,b,n.subType,n.subDefVal,n.size,x,k)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function e(){var a=g.value,a=0==a.length&&"string"!=l?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",l="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className=
-"gePropEditor";"int"!=l&&"float"!=l||n.allowAuto||(g.type="number",g.step="int"==l?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));n.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(q,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",
-y.appendChild(k));x.appendChild(y);return x}var q=this,u=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;x.appendChild(y);mxUtils.write(x,mxResources.get("property"));
-l.style.cursor="pointer";var B=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(pa){}}else y.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(l,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;
-B()});l.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");l.appendChild(x);v.appendChild(l);var A=!1,t=!1,z;for(z in c)if(l=c[z],"function"!=typeof l.isVisible||l.isVisible(b,this)){var D=null!=b.style[z]?mxUtils.htmlEntities(b.style[z]+""):null!=l.getDefaultValue?l.getDefaultValue(b,this):l.defVal;if("separator"==l.type)t=!t;else{if("staticArr"==l.type)l.size=parseInt(b.style[l.sizeProperty]||c[l.sizeProperty].defVal)||0;else if(null!=
-l.dependentProps){for(var C=l.dependentProps,E=[],J=[],x=0;x<C.length;x++){var G=b.style[C[x]];J.push(c[C[x]].subDefVal);E.push(null!=G?G.split(","):[])}l.dependentPropsDefVal=J;l.dependentPropsVals=E}v.appendChild(n(z,D,l,A,t));A=!A}}for(x=0;x<k.length;x++)for(l=k[x],c=l.parentRow,b=0;b<l.values.length;b++)z=n(l.name,l.values[b],{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:b,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==b%2,l.flipBkg),c.parentNode.insertBefore(z,
-c.nextSibling),c=z;a.appendChild(v);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,f=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
-var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var m=[],p=0;p<this.defaultColorSchemes.length;p++){var n=document.createElement("div");n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight=
-"3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(p);m.push(n);g.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;u(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background=
-"#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{for(var d=f.getSelectionCells(),g=0;g<d.length;g++){for(var m=f.getModel().getStyle(d[g]),p=0;p<e.length;p++)m=mxUtils.removeStylename(m,e[p]);var n=f.getModel().isVertex(d[g])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,
-null)),mxEvent.isAltDown(c)||(m=""==a.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(m=""==a.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!f.getModel().isVertex(d[g])||
-(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[g])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,
-mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[g],m)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage=
+f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(N){}}};var t=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));t.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,f=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],
+c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
+c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
+function(a,c,b){function f(a,c,b,f){x.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(x.setCellStyles(b.countProperty,g.length,x.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}x.setCellStyles(a,
+c,x.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var k=p.length;k<c;k++)p.push(m);p=p.join(",");x.setCellStyles(b.dependentProps[a],p,x.getSelectionCells());d.push(b.dependentProps[a]);e.push(p)}if("function"==typeof b.onChange)b.onChange(x,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",x.getSelectionCells()))}finally{x.getModel().endUpdate()}}
+function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
+function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,l){null!=c&&(c=c.split(","),k.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=g,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==
+a)m=m.nextSibling,t++;else break;var x={type:b,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:e},t=p(a,"",x,0==t%2,l);f(a,d,x);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,f,d,e,g){if(0<d){var l=Array(d);c=null!=c?c.split(","):[];for(var m=0;m<d;m++)l[m]=null!=c[m]?c[m]:null!=f?f:"";k.push({name:a,values:l,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
+function m(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function p(c,b,p,x,k){var v=p.dispName,n=p.type,z=document.createElement("tr");z.className="gePropRow"+(k?"Dark":"")+(x?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);x=!1;null!=p.index&&(z.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",x=!0);var y=document.createElement("td");
+y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));x&&(y.style.textAlign="right");z.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==n)y.appendChild(e(c,b,p));else if("bool"==n||"boolean"==n)y.appendChild(m(c,b,p));else if("enum"==n){var A=p.enumList;for(k=0;k<A.length;k++)if(v=A[k],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var e=
+document.createElement("select");d(y,e);for(var g=0;g<A.length;g++){var l=A[g],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(m)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==n?y.appendChild(g(c,b,p.subType,p.subDefVal,p.countProperty,
+z,k)):"staticArr"==n?y.appendChild(l(c,b,p.subType,p.subDefVal,p.size,z,k)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function e(){var a=g.value,a=0==a.length&&"string"!=n?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");f(c,a,p)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className=
+"gePropEditor";"int"!=n&&"float"!=n||p.allowAuto||(g.type="number",g.step="int"==n?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));p.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(t,function(a){f(c,"",p,p.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",
+y.appendChild(k));z.appendChild(y);return z}var t=this,x=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.className="geProperties";n.style.whiteSpace="nowrap";n.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;z.appendChild(y);mxUtils.write(z,mxResources.get("property"));
+v.style.cursor="pointer";var A=function(){var c=n.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(sa){}}else y.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+A()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");v.appendChild(z);n.appendChild(v);var B=!1,C=!1,q;for(q in c)if(v=c[q],"function"!=typeof v.isVisible||v.isVisible(b,this)){var u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):null!=v.getDefaultValue?v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)C=!C;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=
+v.dependentProps){for(var D=v.dependentProps,K=[],I=[],z=0;z<D.length;z++){var E=b.style[D[z]];I.push(c[D[z]].subDefVal);K.push(null!=E?E.split(","):[])}v.dependentPropsDefVal=I;v.dependentPropsVals=K}n.appendChild(p(q,u,v,B,C));B=!B}}for(z=0;z<k.length;z++)for(v=k[z],c=v.parentRow,b=0;b<v.values.length;b++)q=p(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(q,
+c.nextSibling),c=q;a.appendChild(n);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,f=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
+var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
+"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(m);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;x(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
+"#84d7ff"}),x=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{for(var d=f.getSelectionCells(),g=0;g<d.length;g++){for(var l=f.getModel().getStyle(d[g]),m=0;m<e.length;m++)l=mxUtils.removeStylename(l,e[m]);var p=f.getModel().isVertex(d[g])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
+null)),mxEvent.isAltDown(c)||(l=""==a.fill?mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(l=""==a.stroke?mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!f.getModel().isVertex(d[g])||
+(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(l=mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),l=mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[g])&&(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,
+mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[g],l)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage=
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(b.initialDefaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=g;c.style.border="1px solid "+m}d.appendChild(c)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
-4)&&mxUtils.br(d),c(a[g])});null==this.format.currentScheme?q("dark"==uiTheme?1:0):q(this.format.currentScheme);var p=10>=this.defaultColorSchemes.length?28:8,k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:"+p+"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(k,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+p+"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&&(a.appendChild(k),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(k);c(v);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
+mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=g;c.style.border="1px solid "+l}d.appendChild(c)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
+4)&&mxUtils.br(d),c(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"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(k,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"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&&(a.appendChild(k),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(k);c(n);x(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft=
"2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var x=Graph.prototype.init;
-Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=a.button,c.relatedTarget=a.relatedTarget}catch(H){}}x.apply(this,arguments);
+Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=a.button,c.relatedTarget=a.relatedTarget}catch(N){}}x.apply(this,arguments);
window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);
if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||
2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,
-"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=D.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
-return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,m,p,n,q,k){var u=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var v=z.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var l=v.ownerDocument,x=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");null!=l.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var y="",B="",A=0;A<this.extFonts.length;A++){var t=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-t+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(l.createTextNode(y+B));v.getElementsByTagName("defs")[0].appendChild(x)}null!=u&&(this.stylesheet=u,this.refresh());return v};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
-mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
+"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var C=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return C.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=z.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
+return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,m,p,t,x){var k=null;x||null==this.themes||"darkTheme"!=this.defaultThemeName||(k=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var n=D.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var v=n.ownerDocument,z=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?z.setAttributeNS("type","text/css"):z.setAttribute("type","text/css");for(var y="",A="",B=0;B<this.extFonts.length;B++){var q=this.extFonts[B].name,C=this.extFonts[B].url;0==C.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+C+");\n":A+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+C+'");\n}\n'}z.appendChild(v.createTextNode(y+A));n.getElementsByTagName("defs")[0].appendChild(z)}null!=k&&(this.stylesheet=k,this.refresh());return n};var I=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=I.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
-this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
+this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=
0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));null!=b.viewbox&&this.fitWindow(b.viewbox,b.viewbox.border);0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=
this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=f.getElementsByTagName("a"),e=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(c,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
-c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(P){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,
+c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(T){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,
f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],f=0;f<c.cells.length;f++)if("*"==c.cells[f])b.push(c.cells[f]);else{var d=a[c.cells[f]];null!=d?""!=d&&b.push(d):b.push(c.cells[f])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),
-c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},m=0;m<a.length;m++)0<a[m].length&&(g[a[m].toLowerCase()]=!0,e++);for(m=0;m<c.length;m++)if(f&&this.model.getParent(c[m])==this.model.root||this.model.isVertex(c[m])||this.model.isEdge(c[m])){var p=null!=
-c[m].value&&"object"==typeof c[m].value?mxUtils.trim(c[m].value.getAttribute(b)||""):"",n=!1;if(0<p.length){if(p=p.toLowerCase().split(" "),p.length>=a.length){for(var q=n=0;q<p.length&&n<e;q++)null!=g[p[q]]&&n++;n=n==e}}else n=0==a.length;n&&d.push(c[m])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();
+c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<c.length;l++)if(f&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var m=null!=
+c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)||""):"",p=!1;if(0<m.length){if(m=m.toLowerCase().split(" "),m.length>=a.length){for(var t=p=0;t<m.length&&p<e;t++)null!=g[m[t]]&&p++;p=p==e}}else p=0==a.length;p&&d.push(c[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();
try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=
e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");
e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");
@@ -3244,423 +3244,425 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
[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.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(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,c,b,f,d,e,g,m,p,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&mxStencilRegistry.getStencil(q)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,Math.min(m,Math.max(parseInt(l.value),parseInt(v.value))));v.value=Math.max(1,Math.min(m,Math.min(parseInt(l.value),parseInt(v.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,m=c.currentTranslate,n=c.currentScale,p=c.view.translate,q=
-c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var k=c.getGraphBounds(),v=0,l=0,u=ba.get(),x=1/c.pageScale,t=A.checked;if(t)var x=parseInt(J.value),z=parseInt(Q.value),x=Math.min(u.height*z/(k.height/c.view.scale),u.width*x/(k.width/c.view.scale));else x=parseInt(y.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,y.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*
-f);u.height=Math.ceil(u.height*f);x*=f;!t&&c.pageVisible?(k=c.getPageLayout(),v-=k.x*u.width,l-=k.y*u.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,x,u,0,v,l,t);b.pageSelector=!1;b.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(b.title=v.getTitle());var D=b.writeHead;b.writeHead=function(b){D.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
-null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
-b.renderPage;b.renderPage=function(c,b,f,d,e,g){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}v=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(v=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=v&&(d.stylesheet=v,d.refresh())}else{u=
-c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";b.backgroundColor=u;b.autoOrigin=t;b.appendGraph(c,x,v,l,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)v=c.extFonts[e].name,l=c.extFonts[e].url,0==l.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+l+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+l+'");\n}'),
-b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=m,c.currentScale=n,c.view.translate=p,c.view.scale=q);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=v.value,m=l.value,n=!q.checked,k=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,g,m,A.checked,J.value,Q.value,parseInt(y.value)/100,parseInt(ma.value)/
-100,ba.get());else{n&&(n=g==p&&m==p);if(!n&&null!=a.pages&&a.pages.length){var u=0,n=a.pages.length-1;q.checked||(u=parseInt(g)-1,n=parseInt(m)-1);for(var x=u;x<=n;x++){var t=a.pages[x],g=t==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),m=!0,u=!1,z=null,D=null;null==t.viewState&&null==t.root&&a.updatePageRoot(t);null!=t.viewState&&(m=t.viewState.pageVisible,u=t.viewState.mathEnabled,z=t.viewState.background,D=t.viewState.backgroundImage,g.extFonts=t.viewState.extFonts);
-g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=m;g.mathEnabled=u;var B=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?t.getName():"pagenumber"==c?x+1:"pagecount"==c?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(t);g.model.setRoot(t.root)}k=b(g,k,x!=n);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=b(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
-(k.mathEnabled&&(n=k.wnd.document,c&&(k.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&c&&PrintDialog.printPreview(k));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var m=1,p=1,n=
-document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var k=q.cloneNode(!0);q.setAttribute("checked","checked");
-k.setAttribute("value","range");n.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var 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";n.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var l=v.cloneNode(!0);n.appendChild(l);mxEvent.addListener(v,"focus",
-function(){k.checked=!0});mxEvent.addListener(l,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(l,"change",b);if(null!=a.pages&&(m=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+1;v.value=p;l.value=p;break}v.setAttribute("max",m);l.setAttribute("max",m);a.isPagesEnabled()?1<m&&(e.appendChild(n),k.checked=!0):k.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var x=document.createElement("input");
-x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");u.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";u.appendChild(y);mxEvent.addListener(y,"focus",function(){x.checked=!0});e.appendChild(u);var n=n.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value",
-"fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(A);n.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var t=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),K=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign=
-"right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";E.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var Q=J.cloneNode(!0);I.appendChild(Q);mxEvent.addListener(J,"focus",function(){A.checked=!0});mxEvent.addListener(Q,
-"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));K.appendChild(g);z.appendChild(C);z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(K);t.appendChild(z);t.appendChild(D);u.appendChild(t);n.appendChild(u);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);
-g=document.createElement("div");g.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="60px";n.appendChild(ma);e.appendChild(n);g=document.createElement("div");g.style.cssText=
-"text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
-"print":"ok"),function(){a.hideDialog();f(!0)});u.className="geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
+[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var E=mxMarker.createMarker;mxMarker.createMarker=
+function(a,c,b,f,d,e,g,l,m,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return E.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){n.value=Math.max(1,Math.min(l,Math.max(parseInt(n.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(n.value),parseInt(k.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,l=c.currentTranslate,m=c.currentScale,p=c.view.translate,t=
+c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var x=c.getGraphBounds(),k=0,n=0,z=ia.get(),y=1/c.pageScale,q=B.checked;if(q)var y=parseInt(G.value),C=parseInt(P.value),y=Math.min(z.height*C/(x.height/c.view.scale),z.width*y/(x.width/c.view.scale));else y=parseInt(v.value)/(100*c.pageScale),isNaN(y)&&(f=1/c.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*
+f);z.height=Math.ceil(z.height*f);y*=f;!q&&c.pageVisible?(x=c.getPageLayout(),k-=x.x*z.width,n-=x.y*z.height):q=!0;if(null==b){b=PrintDialog.createPrintPreview(c,y,z,0,k,n,q);b.pageSelector=!1;b.mathEnabled=!1;k=a.getCurrentFile();null!=k&&(b.title=k.getTitle());var u=b.writeHead;b.writeHead=function(b){u.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
+null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=
+b.renderPage;b.renderPage=function(c,b,f,d,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=A.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=k&&(d.stylesheet=k,d.refresh())}else{z=
+c.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=q;b.appendGraph(c,y,k,n,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)k=c.extFonts[e].name,n=c.extFonts[e].url,0==n.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+n+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+n+'");\n}'),
+b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(la.value)/100;isNaN(f)&&(f=1,la.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,g,l,B.checked,G.value,P.value,parseInt(v.value)/100,parseInt(la.value)/
+100,ia.get());else{p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var z=0,p=a.pages.length-1;t.checked||(z=parseInt(g)-1,p=parseInt(l)-1);for(var y=z;y<=p;y++){var q=a.pages[y],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,z=!1,C=null,u=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,z=q.viewState.mathEnabled,C=q.viewState.background,u=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);
+g.background=C;g.backgroundImage=null!=u?new mxImage(u.src,u.width,u.height):null;g.pageVisible=l;g.mathEnabled=z;var A=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?q.getName():"pagenumber"==c?y+1:"pagecount"==c?null!=a.pages?a.pages.length:1:A.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}x=b(g,x,y!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else x=b(d);null==x?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(x.mathEnabled&&(p=x.wnd.document,c&&(x.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),x.closeDocument(),!x.mathEnabled&&c&&PrintDialog.printPreview(x));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,m=1,p=
+document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var x=t.cloneNode(!0);t.setAttribute("checked","checked");
+x.setAttribute("value","range");p.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var n=k.cloneNode(!0);p.appendChild(n);mxEvent.addListener(k,"focus",
+function(){x.checked=!0});mxEvent.addListener(n,"focus",function(){x.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(n,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+1;k.value=m;n.value=m;break}k.setAttribute("max",l);n.setAttribute("max",l);a.isPagesEnabled()?1<l&&(e.appendChild(p),x.checked=!0):x.checked=!0;var z=document.createElement("div");z.style.marginBottom="10px";var y=document.createElement("input");
+y.style.marginRight="8px";y.setAttribute("value","adjust");y.setAttribute("type","radio");y.setAttribute("name","printZoom");z.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));z.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";z.appendChild(v);mxEvent.addListener(v,"focus",function(){y.checked=!0});e.appendChild(z);var p=p.cloneNode(!1),B=y.cloneNode(!0);B.setAttribute("value",
+"fit");y.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(B);p.appendChild(g);z=document.createElement("table");z.style.display="inline-block";var C=document.createElement("tbody"),q=document.createElement("tr"),u=q.cloneNode(!0),D=document.createElement("td"),I=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),K=D.cloneNode(!0),H=D.cloneNode(!0);D.style.textAlign="right";F.style.textAlign=
+"right";mxUtils.write(D,mxResources.get("fitTo"));var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";I.appendChild(G);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));E.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var P=G.cloneNode(!0);K.appendChild(P);mxEvent.addListener(G,"focus",function(){B.checked=!0});mxEvent.addListener(P,
+"focus",function(){B.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));H.appendChild(g);q.appendChild(D);q.appendChild(I);q.appendChild(E);u.appendChild(F);u.appendChild(K);u.appendChild(H);C.appendChild(q);C.appendChild(u);z.appendChild(C);p.appendChild(z);e.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);
+g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="60px";p.appendChild(la);e.appendChild(p);g=document.createElement("div");g.style.cssText=
+"text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||(z=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),z.className="geBtn",g.appendChild(z));PrintDialog.previewEnabled&&(z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),z.className="geBtn",g.appendChild(z));z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
+"print":"ok"),function(){a.hideDialog();f(!0)});z.className="geBtn gePrimaryBtn";g.appendChild(z);a.editor.cancelFirst||g.appendChild(p);e.appendChild(g);this.container=e};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.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 I=document.createElement("canvas"),K=new Image;K.onload=function(){try{I.getContext("2d").drawImage(K,0,0);var a=I.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(J){}};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(u){}})();
+this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),G=new Image;G.onload=function(){try{H.getContext("2d").drawImage(G,0,0);var a=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};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(v){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,d,e,p,n,k){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
--1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(a);(new Image).src=c+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(x){}try{k||
-null==window.console||console.error(n,a,b,d,e,p)}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
+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(a,b,d,e,m,t,p){t=null!=t?t:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(a);(new Image).src=c+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(C){}try{p||
+null==window.console||console.error(t,a,b,d,e,m)}catch(C){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=
e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.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;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=
-document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=
+document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
-c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
-EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var p=mxUtils.parseXml(c),n=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
-function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(d[e]));
-null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,p,n,k,q,l,y,t){b=null!=b?b:this.editor.graph;p=null!=p?p:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(t){var m=a.ownerDocument.createElement("diagram");m.setAttribute("id",
-Editor.guid());m.appendChild(a)}else{m=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(m);if(Graph.decompress(g)!=m)return m;m=a.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(m)}y?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),
-g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),
-a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));t=t?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!p&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))t=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||!p&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),t=this.getEmbeddedSvg(t,b,
-e,null,q,l,f);return t};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):
-(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
+EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,e=this.editor.graph,m=this;b.getFunction=function(a){if(e.isSelectionEmpty()&&null!=
+m.pages&&0<m.pages.length){var c=m.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&m.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&m.movePage(c,0)};if(39==a.keyCode)return function(){c<m.pages.length-1&&m.movePage(c,c+1)};if(40==a.keyCode)return function(){c<m.pages.length-1&&m.movePage(c,m.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&m.selectNextPage(!1)};if(38==
+a.keyCode)return function(){0<c&&m.selectPage(m.pages[0])};if(39==a.keyCode)return function(){c<m.pages.length-1&&m.selectNextPage(!0)};if(40==a.keyCode)return function(){c<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var e=a.lastIndexOf("&lt;/mxfile&gt;");
+e>d&&(c=a.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(a),t=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=t?mxUtils.getXml(t):""}catch(p){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));
+a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
+this.pages:[];for(var e=d.length-1;0<=e;e--){var t=this.updatePageRoot(new DiagramPage(d[e]));null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,t,0==e?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,
+this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,t,p,x,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=
+g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),
+g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),
+g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!t&&!m&&(p||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(t||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&
+d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,e,null,x,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][c].data=
-n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
+/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(t){a[EditorUi.DIFF_INSERT][c].data=
+t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=
0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=
c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),
-this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,p,n,k,q,l,y){p=null!=p?p:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))if(y=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(p,n,y);l=null!=l?l:this.getCurrentFile();a=this.createFileData(k,c,l,window.location.href,a,b,d,e,p,q,y);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);
-return a};EditorUi.prototype.getHtml=function(a,b,d,e,p,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==p&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=p&&(p=p.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));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!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+f+'">\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(a,b,d,e,p){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==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!=d?"<title>"+mxUtils.htmlEntities(d)+"</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(a))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+b+'">\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(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
+this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,m,t,p,x,k,n){m=null!=m?m:!0;t=null!=t?t:!1;var c=this.editor.graph;if(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))if(n=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}p=null!=p?p:this.getXmlFileData(m,t,n);k=null!=k?k:this.getCurrentFile();a=this.createFileData(p,c,k,window.location.href,a,b,d,e,m,x,n);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);
+return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,t){t=null!=t?t:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=t?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;t=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",t);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),d=0;d<k.length;d++){var q=k[d];n.setVisible(q,a[q.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,p,n,k,q,l,y,t){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!p),
-f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,p,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;
-null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c,a,e,b,k,p,q,l,y,t);this.editor.graph.pageVisible=f;return d}catch(P){this.handleError(P)}}));else{var m=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
-null;var D=this.editor.graph.getSvg(x,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,d,e,p,n,k,q,l,y){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",m="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==b&&0==n&&(m="&allPages=1");if("xmlpng"==b&&(y="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"!=b&&"pdf"!=b||!p?p||
-null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;p={globalVars:c.getExportVariables()};l&&(p.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+y+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=k?"&scale="+k:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var t=this.editor.graph.getModel(),p=t.getChildren(t.root),d=0;d<p.length;d++){var k=p[d];t.setVisible(k,a[k.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
+this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,m,t,p,k,n,z,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!m),
+f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,m,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;
+null!=t&&(this.editor.graph.pageVisible=t);var d=this.createDownloadRequest(c,a,e,b,p,m,k,n,z,q);this.editor.graph.pageVisible=f;return d}catch(O){this.handleError(O)}}));else{var l=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=
+null;var C=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(C);this.editor.convertImages(C,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(v){this.handleError(v)}};EditorUi.prototype.createDownloadRequest=
+function(a,b,d,e,m,t,p,k,n,z){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==t?!1:"xmlpng"!=b);var g="",l="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==b&&0==t&&(l="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=this.pages&&null!=this.currentPage))for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){g="&from="+t;break}t=c.background;"png"!=b&&"pdf"!=b||!m?m||
+null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;m={globalVars:c.getExportVariables()};n&&(m.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+l+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+e+"&embedXml="+z+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=p?"&scale="+p:"")+(null!=k?"&border="+k:""))};EditorUi.prototype.setMode=function(a,
b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,m=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
-n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(m,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();m()}));n();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=
-new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var q=n.getCell(a.getAttribute("id"));if(null!=q){try{var l=a.getAttribute("value");if(null!=l){var y=
-mxUtils.parseXml(l).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))n.setValue(q,y);else for(var t=y.attributes,z=0;z<t.length;z++)e.setAttributeForCell(q,t[z].nodeName,0<t[z].nodeValue.length?t[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+q.id+": "+u)}try{var E=a.getAttribute("style");null!=E&&e.model.setStyle(q,E)}catch(u){null!=window.console&&console.log("Error in style for "+q.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var C=
-0<A.length?JSON.parse(A):null;null!=C&&C.append||e.removeCellOverlays(q);null!=C&&e.addCellOverlay(q,c(C))}}catch(u){null!=window.console&&console.log("Error in icon for "+q.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=e.getCellGeometry(q);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}e.model.setGeometry(q,F)}}}catch(u){null!=window.console&&
-console.log("Error in icon for "+q.id+": "+u)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,q=e.getDate(),l=e.getHours(),y=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+k+"-"+q+"-"+l+"-"+y+"-"+e));
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+m=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();l()}));m();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=
+new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,t=e.getModel();t.beginUpdate();var p=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=t.getCell(a.getAttribute("id"));if(null!=k){try{var n=a.getAttribute("value");if(null!=n){var z=
+mxUtils.parseXml(n).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))t.setValue(k,z);else for(var q=z.attributes,u=0;u<q.length;u++)e.setAttributeForCell(k,q[u].nodeName,0<q[u].nodeValue.length?q[u].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var y=a.getAttribute("style");null!=y&&e.model.setStyle(k,y)}catch(K){null!=window.console&&console.log("Error in style for "+k.id+": "+K)}try{var B=a.getAttribute("icon");if(null!=B){var E=
+0<B.length?JSON.parse(B):null;null!=E&&E.append||e.removeCellOverlays(k);null!=E&&e.addCellOverlay(k,c(E))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),H=e.getCellGeometry(k);if(null!=H){H=H.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?H.x+=G:"dy"==key?H.y+=G:"dw"==key?H.width+=G:"dh"==key?H.height+=G:H[key]=parseFloat(F[key])}e.model.setGeometry(k,H)}}}catch(K){null!=window.console&&
+console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var v=a.firstChild;null!=v&&v.nodeType!=mxConstants.NODETYPE_ELEMENT;)v=v.nextSibling;null!=v&&(new mxCodec(a.firstChild)).decode(v,t)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(p=a.hasAttribute("max-scale")?
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{t.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),p=e.getMonth()+1,k=e.getDate(),n=e.getHours(),z=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+p+"-"+k+"-"+n+"-"+z+"-"+e));
return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(q){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(v,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
-0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");f.root=a[e].root;var q=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,q,!0);q.removeAttribute("pageWidth");q.removeAttribute("pageHeight");k.appendChild(q);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,f){return!f||"mxGeometry"!=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){this.fileLoadedError=p;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+p.message,label:"stack_"+p.stack})}catch(x){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(p,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
+0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var p=a[e].node.cloneNode(!1);p.removeAttribute("name");f.root=a[e].root;var k=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");p.appendChild(k);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,f){return!f||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,d,e,p,n,k){};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(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
+function(a,b,d,e,m,k,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var f=JSON.parse(mxUtils.getTextContent(c.documentElement));
-this.libraryLoaded(a,f,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
-null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var k=m.parentNode.previousSibling;e=k.getAttribute("title");
-null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");k.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");
-t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,A=null,
-C=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=t.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",l.insertBefore(A,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=t.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(k.style.paddingRight=18*l.childNodes.length+
-"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),k.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=E.getCellGeometry(a[g]);null!=n&&n.translate(-c.x,-c.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
-(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),f=E.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=E.view.translate.x;b.y-=E.view.translate.y;
-F(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(m.style.backgroundColor=
-"",m.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
-function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,n,p,k,q,l,v){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,k),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,p,k),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var n=
-JSON.parse(mxUtils.getTextContent(e.documentElement));g(n,m);b=b.concat(n);G(a);this.spinner.stop();u=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),n=0;n<p.length;n++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[n])),q=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,q.width,q.height),a)}u=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(v,function(a){x(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));l.insertBefore(t,l.firstChild);mxEvent.addListener(t,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
-m&&C(a)});e=t.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));l.insertBefore(e,l.firstChild);mxEvent.addListener(e,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),l.insertBefore(e,l.firstChild))}k.appendChild(l);k.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var f=a[c],d=f.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(Graph.decompress(f.xml)),
-0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.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=mxClient.IS_QUIRKS?
+EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));
+this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
+null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var k=l.parentNode.previousSibling;e=k.getAttribute("title");
+null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
+q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var u=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var y=this.editor.graph,B=null,
+E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=q.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",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==u&&(u=q.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),n.insertBefore(u,n.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==u||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
+"px",u.parentNode.removeChild(u),u=null)});mxEvent.consume(c)})),k.style.paddingRight=18*n.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,e){a=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var m=y.getCellGeometry(a[g]);null!=m&&m.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
+(a.title=e);b.push(a);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),G=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=y.getSelectionCells(),b=y.view.getBounds(c),d=y.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=y.view.translate.x;b.y-=y.view.translate.y;
+H(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.first&&(y.graphHandler.suspend(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),l.style.backgroundColor="#f1f3f4",l.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(l.style.backgroundColor=
+"",l.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.first&&(y.graphHandler.resume(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),l.style.backgroundColor="",l.style.cursor="",y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,
+function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,p,k,t,x,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,k),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,p,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var z=!1,y=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);F(a);this.spinner.stop();z=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[m])),t=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,t.width,t.height),a)}z=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){y(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?y(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):y(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==
+l&&E(a)});e=q.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),
+0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.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=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,p){a=new ImageDialog(this,a,b,d,e,p);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,p){a=new LibraryDialog(this,a,b,d,e,p);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
-function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));
-a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,p,n,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(A){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
-m=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),m=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.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 l=null!=n?n:window.location.hash;
-if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){l="#U"==l.substring(0,2)?l.substring(45,l.lastIndexOf("%26ex")):l.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
-l);this.handleError(a,b,d,e,p)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;d.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");d.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;
-d.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("changeUser")+": ");b.appendChild(f);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var b=d.value,f=c.length!=b;f&&this.drive.setUser(c[b]);this.drive.authorize(f,mxUtils.bind(this,function(){f||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
-!0)}));b.appendChild(d);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,d,m,null,null,n,v,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,e,
-p,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,p,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var f=document.createElement("div");
+a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,m,k,p){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=f||null!=b){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
+l=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),l=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var t=null!=k?k: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!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){t="#U"==t.substring(0,2)?t.substring(45,t.lastIndexOf("%26ex")):t.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
+t);this.handleError(a,b,d,e,m)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;
+f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
+!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?p=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):
+f.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=k=null;null!=f&&null!=f.helpLink&&(k=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,p,g,d,l,null,null,k,n,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,e,
+m,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var f=document.createElement("div");
f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+
"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(c);mxUtils.write(f,b);document.body.appendChild(f);
this.bannerShowing=!0;var e=document.createElement("div");e.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";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b);f.style.paddingBottom="30px";f.appendChild(e);var k=mxUtils.bind(this,
-function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var l=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(f,"click",
-mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b?(null!=d&&d(),k(),mxEvent.consume(a)):l()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(l,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
-EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,p){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,p);this.saveData(e,c,a.substring(a.lastIndexOf(",")+
+function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(f,"click",
+mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b?(null!=d&&d(),k(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
+EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,m){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,m);this.saveData(e,c,a.substring(a.lastIndexOf(",")+
1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,
-620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,p,n){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b=b+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
-!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){c.href=URL.createObjectURL(e?
-this.base64ToBlob(a,d):new Blob([a],{type:d}));n?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(x){}}else this.createEchoRequest(a,b,d,e,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,p,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=p?"&format="+p:"")+(null!=n?"&base64="+
-n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,d=Math.ceil(f/1024),e=Array(d),k=0;k<d;++k){for(var q=1024*k,l=Math.min(q+1024,f),y=Array(l-q),t=0;q<l;++t,++q)y[t]=c[q].charCodeAt(0);e[k]=new Uint8Array(y)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,p,n,k,q){n=null!=n?n:!1;k=null!=k?k:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(n);
-isLocalStorage&&p++;var c=4>=p?2:6<p?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e,null,q):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,
-c,d,e,b,f)}catch(A){this.handleError(A)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<p,c,a,d,e);n=this.isServices(p)?p>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+
-a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,
-"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var f=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";
-this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",
-mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,p){this.isLocalFileSave()?this.saveLocalFile(d,a,e,p,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,p,b,c)}),d,p,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,p,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
-function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,n,!0,c,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,f,e,n,p);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,p,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,p,n,k,q,l,y,t){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f=t?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(f,a,k,q,null,d,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!0,t);e&&this.editor.graph.addSvgShadow(g);var m=this.getBaseFilename()+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();p&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,l,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-c.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,v,this.thumbImageCache)):v(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,p,n,k){return this.addCheckbox(a,
-d,e,p,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,p,n,k,q){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=k;null!=q&&c.setAttribute("name",q);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",k),a.appendChild(d),
-p||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,
-mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));
-mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":d:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+
-e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value",
-"blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",
-mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createUrlParameters=
-function(a,b,d,e,p,n,k){k=null!=k?k:[];e&&("1"==urlParams.dev&&k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=p&&0<p.length&&k.push("edit="+encodeURIComponent(p)),n&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,
-b,d,e,p,n,k,l,x){x=null!=x?x:this.createUrlParameters(a,b,d,e,p,n);a=this.getCurrentFile();b=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),l||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(a.getTitle()));return(e&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,p,n,k,l,x,y,t){this.getBasenames();var c={};""!=p&&p!=mxConstants.NONE&&(c.highlight=p);"auto"!==e&&(c.target=e);x||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),
-c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(x&&d.push("lightbox"),c.toolbar=d.join(" "));null!=y&&0<y.length&&(c.edit=y);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+
-encodeURIComponent(a):"";t(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
-mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");f=m.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),
-mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&m.setAttribute("disabled","disabled");c.appendChild(g);var t=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
-"100%";c.appendChild(E);var A=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(c,mxResources.get("allPages"),g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0),F=this.addCheckbox(c,mxResources.get("lightbox"),!0),I=this.addEditButton(c,F),K=I.getEditInput();K.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):
-I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(m.checked?d:null,z.checked,E.value,t.getTarget(),t.getColor(),A.checked,C.checked,G.checked,F.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,p,n,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,a||mxResources.get("link"));c.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(c);var f=this.getCurrentFile(),c="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=f&&f.constructor==window.DriveFile&&!b){a=80;var c="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");m.style.whiteSpace=
-"normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));g.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(f.getId())}));m.style.marginTop="12px";m.className="geBtn";g.appendChild(m);k.appendChild(g);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"));g.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,v=null;if(null!=d||null!=e)a+=30,mxUtils.write(k,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight=
-"16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",k.appendChild(l),mxUtils.write(k,mxResources.get("height")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.width="50px",v.style.marginLeft="6px",v.style.marginBottom="10px",v.value=e+"px",k.appendChild(v),mxUtils.br(k);var t=this.addLinkSection(k,n);d=null!=this.pages&&1<this.pages.length;var C=null;if(null==f||f.constructor!=window.DriveFile||b)C=
-this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!n),F=this.addEditButton(k,G),I=F.getEditInput();n&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var K=this.addCheckbox(k,mxResources.get("layers"),!0);K.style.marginLeft=I.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(K.removeAttribute("disabled"),I.removeAttribute("disabled")):(K.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,k,mxUtils.bind(this,function(){p(t.getTarget(),t.getColor(),null==C?!0:C.checked,G.checked,F.getLink(),K.checked,null!=l?l.value:null,null!=v?v.value:null)}),null,mxResources.get("create"),c);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,p){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";c.appendChild(f);if(p){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";c.appendChild(m);mxUtils.br(c)}var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-l=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,t=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(m.value)||0;d(!k.checked,null!=l?l.checked:!1,null!=t?t.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(p?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,d,e,p,n,k,l){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(m);mxUtils.write(c,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
-"12px";q.value=this.lastExportZoom||"100%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";c.appendChild(v);mxUtils.br(c);var t=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),G=null;"dark"==uiTheme&&(G=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(c,
-mxResources.get("selectionOnly"),!1,f.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");n&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(I.setAttribute("checked","checked"),
-I.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");b&&(c.appendChild(u),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var J=null;if("png"==l||"jpeg"==l)J=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
-!0),g+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),P=null!=this.pages&&1<this.pages.length,S=this.addCheckbox(c,P?mxResources.get("allPages"):"",P,!P,null,"jpeg"!=l);S.style.marginLeft="24px";S.style.marginBottom="16px";P?g+=26:S.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&P?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")});k&&P||S.setAttribute("disabled","disabled");var H=document.createElement("select");
-H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
-l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(H),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;p(q.value,t.checked,!F.checked,K.checked,B.checked,u.checked,v.value,I.checked,!S.checked,H.value,null!=J?J.checked:null,null!=G?G.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,p){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),k=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,
-!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,t),A=E.getEditInput(),C=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),C,!C);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(C&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
-A.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,k.checked,l.checked,t.checked,E.getLink(),G.checked)}),null,mxResources.get("embed"),p);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,n,l,q){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var m="";d&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+m+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
-mxUtils.bind(this,function(a){q({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+
-m.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,n,l){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var m=f[g].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));
-b&&this.editor.graph.addSvgShadow(c);if(d){var p=" ",v="";e&&(p="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"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",v+="cursor:pointer;");a&&
-(v+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=v?' style="'+v+'"':"")+p+"/>")}))}else v="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),v+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=v&&c.setAttribute("style",v),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m,k){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),
+d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(f?parseInt(f[2],10):
+!1)?!1:k}if(k||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));k?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(C){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,m,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),p=0;p<f;++p){for(var k=1024*p,n=Math.min(k+1024,d),z=Array(n-k),q=0;k<n;++q,++k)z[q]=c[k].charCodeAt(0);e[p]=new Uint8Array(z)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,m,k,p,n){k=null!=k?k:!1;p=null!=p?p:"vsdx"!=
+m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(k);isLocalStorage&&m++;var c=4>=m?2:6<m?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e,null,n):null!=c&&0<c.length&&
+this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(B){this.handleError(B)}}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,p,null,1<m,c,a,d,e);k=this.isServices(m)?m>c?390:270:160;this.showDialog(b.container,400,k,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";
+a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,
+"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,k,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&
+c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,k,!0,c,d)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,k,!0,c,d)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<c,f,e,k,m);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,
+380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,m,k){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,m,k,p,n,q,z,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&
+(f=null);null==f&&0==b&&(f=u?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var g=this.editor.graph.getSvg(f,a,p,n,null,d,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!0,u);e&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,q,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(H){this.handleError(H)}};EditorUi.prototype.addRadiobox=
+function(a,b,d,e,m,k,p){return this.addCheckbox(a,d,e,m,k,p,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,k,p,n){k=null!=k?k:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();c.id=p;null!=n&&c.setAttribute("name",n);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");k&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,
+b),d.setAttribute("for",p),a.appendChild(d),m||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");
+d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,
+300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){p.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?
+"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",p=
+null,p=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();p.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";p.style.marginLeft="4px";p.style.height="22px";p.style.width="22px";p.style.position="relative";p.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";p.className="geColorBtn";a.appendChild(p);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};
+EditorUi.prototype.createUrlParameters=function(a,b,d,e,m,k,p){p=null!=p?p:[];e&&("1"==urlParams.dev&&p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&p.push("edit="+encodeURIComponent(m)),k&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};
+EditorUi.prototype.createLink=function(a,b,d,e,m,k,p,n,q){q=null!=q?q:this.createUrlParameters(a,b,d,e,m,k);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&q.push("title="+
+encodeURIComponent(a.getTitle()));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<q.length?"?"+q.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,k,p,n,q,z,u){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);q||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);
+isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);n&&d.push("layers");0<d.length&&(q&&d.push("lightbox"),c.toolbar=d.join(" "));null!=z&&0<z.length&&(c.edit=z);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!p);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+
+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";u(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),
+mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(g);var q=this.addLinkSection(c),u=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");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=
+"100%";c.appendChild(y);var B=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),g,!g),F=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,H),v=G.getEditInput();v.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&H.checked?G.getEditSelect().removeAttribute("disabled"):
+G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,u.checked,y.value,q.getTarget(),q.getColor(),B.checked,E.checked,F.checked,H.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,m,k,p){p=document.createElement("div");p.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,a||mxResources.get("link"));c.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(c);var f=this.getCurrentFile(),c="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=f&&f.constructor==window.DriveFile&&!b){a=80;var c="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace=
+"normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));g.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(f.getId())}));l.style.marginTop="12px";l.className="geBtn";g.appendChild(l);p.appendChild(g);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"));g.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=d||null!=e)a+=30,mxUtils.write(p,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight=
+"16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",p.appendChild(n),mxUtils.write(p,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",p.appendChild(t),mxUtils.br(p);var q=this.addLinkSection(p,k);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==f||f.constructor!=window.DriveFile||b)u=
+this.addCheckbox(p,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(p,mxResources.get("lightbox"),!0,null,null,!k),H=this.addEditButton(p,F),G=H.getEditInput();k&&(G.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var v=this.addCheckbox(p,mxResources.get("layers"),!0);v.style.marginLeft=G.style.marginLeft;v.style.marginBottom="16px";v.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(v.removeAttribute("disabled"),G.removeAttribute("disabled")):(v.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"));G.checked&&F.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,p,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==u?!0:u.checked,F.checked,H.getLink(),v.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),c);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";c.appendChild(f);if(m){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+n=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(l.value)||0;d(!k.checked,null!=n?n.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(m?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,d,e,m,k,p,n){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||"0";c.appendChild(x);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),u=null;"dark"==uiTheme&&(u=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var H=this.addCheckbox(c,
+mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");k&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),
+G.defaultChecked=!0);var v=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||K.setAttribute("disabled","disabled");b&&(c.appendChild(K),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var A=null;if("png"==n||"jpeg"==n)A=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),g+=26;var T=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=n),O=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(c,O?mxResources.get("allPages"):"",O,!O,null,"jpeg"!=n);N.style.marginLeft="24px";N.style.marginBottom="16px";O?g+=26:N.style.display="none";mxEvent.addListener(T,"change",function(){T.checked&&O?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")});p&&O||N.setAttribute("disabled","disabled");var J=document.createElement("select");
+J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==
+n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=t.value;m(t.value,q.checked,!H.checked,v.checked,T.checked,K.checked,x.value,G.checked,!N.checked,J.value,null!=A?A.checked:null,null!=u?u.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),k=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,
+!e),n=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),y=this.addEditButton(c,q),u=y.getEditInput(),E=1<f.model.getChildCount(f.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),E,!E);F.style.marginLeft=u.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&F.removeAttribute("disabled"),u.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));
+u.checked&&q.checked?y.getEditSelect().removeAttribute("disabled"):y.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,k.checked,n.checked,q.checked,y.getLink(),F.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,k,p,n){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+c+'"'+l+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
+mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var l=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));l.send(mxUtils.bind(this,function(){200<=l.getStatus()&&299>=l.getStatus()?c("data:image/png;base64,"+
+l.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,e,m,k,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var l=f[g].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));
+b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",t="";e&&(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"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&
+(t+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=t&&c.setAttribute("style",t),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
-a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d=
-parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,k){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),m=c.getGlobalVariable,p=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
-"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,k)}catch(D){null!=b&&b(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,n,l,q){q=null!=q?q:!0;l=b.background;l==mxConstants.NONE&&(l=null);n=b.getSvg(l,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&
-n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(a){q?this.editor.convertImages(a,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(m){b(a)}}))}catch(g){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,d,e,k,n,l,q,t,y,D,z){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,q):null,t,null==this.pages||0==this.pages.length,D)}catch(C){"Invalid image"==C.message?this.downloadFile(t):
-this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,l,y,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
-var m=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length)m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),e=!1,l=1);for(;l<p.length;l++){var t=
-p[l].getAttribute("id");p[l].removeAttribute("id");var E=this.updatePageRoot(new DiagramPage(p[l]));a[t]=p[l].getAttribute("id");var A=this.pages.length;null==E.getName()&&E.setName(mxResources.get("pageWithNumber",[A+1]));f.model.execute(new ChangePage(this,E,E,A,!0));g.push(E)}this.updatePageLinks(a,g)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(c=f.importGraphModel(m,b,d,e),null!=c))for(l=0;l<c.length;l++)this.updatePageLinksForCell(a,c[l])}finally{f.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return c};
-EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var e=c.getElementsByTagName("a"),k=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&(e[l].setAttribute("href",this.updatePageLink(a,
-f)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,
-13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(v){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);
-try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(D){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var k=new XMLHttpRequest;
-k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(E){d(E)}else d({})});k.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(D){d(D)}}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(p){d(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&
-console.error(p),d(p)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
-!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(g))try{var m=b[0].getAttribute("viewBox").split(/\s+/),
-f=parseFloat(m[2]),g=parseFloat(m[3])}catch(z){f=f||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(v){e(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&
-15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),
-0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,m=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(m+1)))),n=mxUtils.parseXml(k).getElementsByTagName("svg");
-0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a,f)}catch(I){e(I)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
-function(a,b,d,e,k,n,l){n=null!=n?n:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=
-this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,n,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,n,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):
-f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,b,d,n,!0);if(0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=
-Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),
-c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,n);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,n))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),
-null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");k.value=a;c.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=c.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&c.setLinkForCell(k,
-k.value);k.geometry.width+=c.gridSize;k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};
-EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display=
-"none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,
-0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,k=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):k||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,k,n,l,q,t,y,D){y=null!=y?y:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
-a,l)):c=this.importXml(a,d,e,y);null!=q&&q(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,y),t=!0)),t||(b=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),y&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=t&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(c=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=t?(c=!0,this.importZipFile(t,
-g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,y);q(f)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,y));c||null==q||q(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,k,n,l,q,t,y,D,z){e=null!=e?e:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=D||this.resampleThreshold,
-p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>m){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,m=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,e,g,k,m,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,g,k,m,n,c,z)}catch(V){return this.handleError(V),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var p=a.length,t=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--t){this.spinner.stop();if(null!=q)q(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}n(b)}}),A=0;A<p;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,
-9)){var p=a.target.result,u=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(u+1)))),t=mxUtils.parseXml(q),q=t.getElementsByTagName("svg");if(0<q.length){var q=q[0],v=z?null:q.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=
-t){var a=t.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=f.getAttribute("width"),q=f.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+l+" "+q);else if(isNaN(l)||isNaN(q)){var y=v.split(" ");3<y.length&&(l=parseFloat(y[2]),q=parseFloat(y[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,
-l)),e/Math.max(1,q)),A=k(p,n.type,b+c*m,d+c*m,Math.max(1,Math.round(l*x)),Math.max(1,Math.round(q*x)),n.name);if(isNaN(l)||isNaN(q)){var B=new Image;B.onload=mxUtils.bind(this,function(){l=Math.max(1,B.width);q=Math.max(1,B.height);A[0].geometry.width=l;A[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+l+" "+q);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[A[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return A}}}catch(Y){}return null})):
-x(c,mxUtils.bind(this,function(){return k(v,"text/xml",b+c*m,d+c*m,0,0,n.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==n.type){var A=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;x(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*m,d+c*m,B.width,B.height,n.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
-mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,p,l){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var q=f&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(e/p,e/l)):1;return k(g,n.type,b+c*m,d+c*m,Math.round(p*q),Math.round(l*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,e,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,k(p,n.type,b+c*m,d+c*m,240,160,n.name,function(a){x(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,b+c*m,d+c*m,240,160,n.name,function(a){x(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?p.readAsDataURL(n):p.readAsText(n)}})(A)});if(g){g=[];
-for(p=0;p<a.length;p++)g.push(a[p]);a=g;this.confirmImageResize(function(a){f=a;v()},t)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,n){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,n))try{var g=Math.max(c/k,f/k);if(1<g){var m=Math.round(c/g),p=Math.round(f/g),l=document.createElement("canvas");
-l.width=m;l.height=p;l.getContext("2d").drawImage(a,0,0,m,p);var t=l.toDataURL();if(t.length<b.length){var A=document.createElement("canvas");A.width=m;A.height=p;var C=A.toDataURL();t!==C&&(b=t,c=m,f=p)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);
-c.src=a}catch(p){if(null!=d)d(p);else throw p;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;"dark"==uiTheme&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+
-":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,e.format,function(f,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=k,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},
-function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
-g),m.height=Math.max(m.height,k),b.cellsResized([c],[m],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,d){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=f)this.editPlantUmlData(c,d,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),
-null!=f)this.editMermaidData(c,d,f);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):e.apply(this,arguments)}}catch(F){a.handleError(F)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(C){a.handleError(C)}return b};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var p=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?
-"&":"?")+"dev=1&drawdev=1");return p.apply(this,arguments)};var n=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};n.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,
-null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var c=l.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,
-a.currentPage)+1:1;return c};var q=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&
-mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/
-2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&
-(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,f,e,g){c.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=
-a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(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)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));
-var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,
-function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=z&&(z.parentNode.removeChild(z),z=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&
-(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),
-c=document.createElement("div");c.innerHTML=b.sanitizeHtml(m);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),null==m&&(m=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,e,g,!0,
-n,null,p))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",
-mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var k=e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var l=
-this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck",
-"false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",
-b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),
-0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&
-this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==
-a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=
-function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
-mxUtils.bind(this,function(a,b){var c=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();
-this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,
-b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=
-function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=
-a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),c=document.createElement("div");c.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&
-"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,g),f=!1));k=k&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(c,
-g),f=!1));f&&Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}k=c.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,
-c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var k=c.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):
-decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(C){}try{var t=this.editor.graph;if(null!=f&&0<f.length){t.lastPasteXml==f?t.pasteCounter++:(t.lastPasteXml=f,t.pasteCounter=0);var z=t.pasteCounter*t.gridSize;if(g||this.isCompatibleString(f))t.setSelectionCells(this.importXml(f,z,z));else if(e&&1==t.getSelectionCount()){var E=t.getStartEditingCell(t.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==t.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_IMAGE,
-f,[E]):(t.labelChanged(E,f),Graph.isLink(f)&&t.setLinkForCell(E,f));t.setSelectionCell(E)}else{var A=t.getInsertPoint();t.isMouseInsertPoint()&&(z=0,t.lastPasteXml==f&&0<t.pasteCounter&&t.pasteCounter--);t.setSelectionCells(this.insertTextAt(f,A.x+z,A.y+z,!0))}t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else d||(t.lastPasteXml=null,t.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:
-a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),
-null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?
-EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,e,k){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":
-b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,
-mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,
-b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if(0==
-a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var f=Editor.extractGraphModelFromPdf(a);null!=f&&(a=f)}this.spinner.stop();this.openLocalFile(a,b,e,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=
-0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(v){this.handleError(v)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d,e,k){var c=this.getCurrentFile(),
-f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,e,k))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
-0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&
-(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
-a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,
-!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,
-d=!1,e=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
-a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?
-mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):l.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),
-"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=k(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),
-"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(V){l.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();
-var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,
-"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){l.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();
-return}if("textContent"==g.action){var v=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||
-g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var K=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=
-g;c.data=a;c.xml=K;l.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(K)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);J(a)}),P=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=P){for(var S=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),
-H,N=0;N<this.pages.length;N++)if(this.pages[N].getId()==P){H=this.updatePageRoot(this.pages[N]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:S.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var ea=u.model,ka=ea.getChildCells(ea.getRoot()),m={},N=0;N<g.layerIds.length;N++)m[g.layerIds[N]]=!0;for(N=0;N<ka.length;N++)ea.setVisible(ka[N],m[ka[N].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(K))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?J("data:image/png;base64,"+
-a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var na=this.getXmlFileData();x.xml=mxUtils.getXml(na);x.data=this.getFileData(null,null,!0,null,null,null,na);x.format=g.format}else if("html"==g.format)K=this.editor.getGraphXml(),x.data=this.getHtml(K,this.editor.graph),x.xml=mxUtils.getXml(K),
-x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var W=this.editor.graph.background;W==mxConstants.NONE&&(W=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var T=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);l.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):
-g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,T,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var Z=this.editor.graph.getSvg(W);this.embedFonts(Z,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){T(mxUtils.getXml(a))})):T(mxUtils.getXml(a))}))}return}l.postMessage(JSON.stringify(x),
-"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==
-uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var la=
-this.getCurrentFile();null!=la&&(n=k(g.xml),null!=n&&""!=n&&la.mergeFile(new LocalFile(this,n),function(){l.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){l.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),
-"*");return}}catch(V){this.handleError(V)}}var ha=mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(ga){this.handleError(ga)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=k();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||
-window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",
-c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;l.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ha(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===
-typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ha(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ha(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),
-ha(g,f))}}));var l=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(k,"*");if("json"==urlParams.proto){var q=this.editor.graph.openLink;this.editor.graph.openLink=function(a,c,b){q.apply(this,arguments);l.postMessage(JSON.stringify({event:"openLink",href:a,target:c,allowOpener:b}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";
-a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var d=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),
-b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b),d=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},l=null,t=null,y=null,D=null,z=null,E=null,A=null,C=null,G="",F="auto",I="auto",K=null,u=null,J=40,B=40,P=100,
-S=0,H=this.editor.graph;H.getGraphBounds();for(var N=function(){null!=b?b(qa):(H.setSelectionCells(qa),H.scrollCellToVisible(H.getSelectionCell()))},ea=H.getFreeInsertPoint(),ka=ea.x,na=ea.y,ea=na,W=null,T="auto",C=null,Z=[],la=null,ha=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)),V++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,
-fa)),L=mxUtils.trim(a.substring(fa+1));"label"==R?W=H.sanitizeHtml(L):"labelname"==R&&0<L.length&&"-"!=L?D=L:"labels"==R&&0<L.length&&"-"!=L?z=JSON.parse(L):"style"==R?l=L:"parentstyle"==R?E=L:"stylename"==R&&0<L.length&&"-"!=L?y=L:"styles"==R&&0<L.length&&"-"!=L?t=JSON.parse(L):"identity"==R&&0<L.length&&"-"!=L?A=L:"parent"==R&&0<L.length&&"-"!=L?C=L:"namespace"==R&&0<L.length&&"-"!=L?G=L:"width"==R?F=L:"height"==R?I=L:"left"==R&&0<L.length?K=L:"top"==R&&0<L.length?u=L:"ignore"==R?ha=L.split(","):
-"connect"==R?Z.push(JSON.parse(L)):"link"==R?la=L:"padding"==R?S=parseFloat(L):"edgespacing"==R?J=parseFloat(L):"nodespacing"==R?B=parseFloat(L):"levelspacing"==R?P=parseFloat(L):"layout"==R&&(T=L)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[V]),R=fa=null,L=[],O=0;O<ga.length;O++)A==ga[O]&&(fa=O),C==ga[O]&&(R=O),L.push(mxUtils.trim(ga[O]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==W&&(W="%"+L[0]+"%");if(null!=
-Z)for(var X=0;X<Z.length;X++)null==k[Z[X].to]&&(k[Z[X].to]={});A=[];for(O=V+1;O<c.length;O++){var ca=this.editor.csvToArray(c[O]);if(null==ca){var ja=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(ja+" ("+O+"):\n"+mxResources.get("containsValidationErrors"));}0<ca.length&&A.push(ca)}H.model.beginUpdate();try{for(O=0;O<A.length;O++){var ca=A[O],M=null,ia=null!=fa?G+ca[fa]:null;null!=ia&&(M=H.model.getCell(ia));var c=null!=M,Y=new mxCell(W,new mxGeometry(ka,ea,0,0),l||"whiteSpace=wrap;html=1;");
-Y.vertex=!0;Y.id=ia;for(var da=0;da<ca.length;da++)H.setAttributeForCell(Y,L[da],ca[da]);if(null!=D&&null!=z){var Q=z[Y.getAttribute(D)];null!=Q&&H.labelChanged(Y,Q)}if(null!=y&&null!=t){var ba=t[Y.getAttribute(y)];null!=ba&&(Y.style=ba)}H.setAttributeForCell(Y,"placeholders","1");Y.style=H.replacePlaceholders(Y,Y.style);c&&(H.model.setGeometry(M,Y.geometry),H.model.setStyle(M,Y.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=Y;if(!c)for(X=0;X<Z.length;X++)k[Z[X].to][M.getAttribute(Z[X].to)]=M;null!=
-la&&"link"!=la&&(H.setLinkForCell(M,M.getAttribute(la)),H.setAttributeForCell(M,la,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var ma=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=K&&null!=M.getAttribute(K)&&(M.geometry.x=ka+parseFloat(M.getAttribute(K))),null!=u&&null!=M.getAttribute(u)&&(M.geometry.y=na+parseFloat(M.getAttribute(u))),"@"==F.charAt(0)&&null!=M.getAttribute(F.substring(1))?M.geometry.width=parseFloat(M.getAttribute(F.substring(1))):M.geometry.width=
-"auto"==F?ma.width+S:parseFloat(F),"@"==I.charAt(0)&&null!=M.getAttribute(I.substring(1))?M.geometry.height=parseFloat(M.getAttribute(I.substring(1))):M.geometry.height="auto"==I?ma.height+S:parseFloat(I),ea+=M.geometry.height+B);c?(null==e[ia]&&(e[ia]=[]),e[ia].push(M)):(C=null!=R?H.model.getCell(G+ca[R]):null,d.push(M),null!=C?(C.style=H.replacePlaceholders(C,E),H.addCell(M,C)):f.push(H.addCell(M)))}for(var pa=f.slice(),qa=f.slice(),X=0;X<Z.length;X++)for(var Aa=Z[X],O=0;O<d.length;O++){var M=d[O],
-Ba=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(H.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=k[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||""));var m="target"==b.placeholders==!b.invert?e:a,m=null!=b.style?H.replacePlaceholders(m,b.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",b.invert?e:
-a,b.invert?a:e,m);if(null!=b.labels)for(m=0;m<b.labels.length;m++){var l=b.labels[m],n=new mxCell(l.label||m,new mxGeometry(null!=l.x?l.x:0,null!=l.y?l.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=l.dx||null!=l.dy)n.geometry.offset=new mxPoint(null!=l.dx?l.dx:0,null!=l.dy?l.dy:0);g.insert(n)}qa.push(g);mxUtils.remove(b.invert?a:e,pa)}}});Ba(M,M,Aa);if(null!=e[M.id])for(da=0;da<e[M.id].length;da++)Ba(M,e[M.id][da],Aa)}if(null!=ha)for(O=0;O<d.length;O++)for(M=
-d[O],da=0;da<ha.length;da++)H.setAttributeForCell(M,mxUtils.trim(ha[da]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(H);ra.spacing=J;var wa=function(){0<ra.spacing&&ra.execute(H.getDefaultParent());for(var a=0;a<f.length;a++){var c=H.getCellGeometry(f[a]);c.x=Math.round(H.snap(c.x));c.y=Math.round(H.snap(c.y));"auto"==F&&(c.width=Math.round(H.snap(c.width)));"auto"==I&&(c.height=Math.round(H.snap(c.height)))}};if("["==T.charAt(0)){var Ca=N;H.view.validate();this.executeLayoutList(JSON.parse(T),
-function(){wa();Ca()});N=null}else if("circle"==T){var sa=new mxCircleLayout(H);sa.resetEdges=!1;var xa=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){sa.execute(H.getDefaultParent());wa()},!0,N);N=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&qa.length==2*f.length-1&&1==pa.length){H.view.validate();var ta=new mxCompactTreeLayout(H,"horizontaltree"==T);ta.levelDistance=B;ta.edgeRouting=!1;ta.resetEdges=
-!1;this.executeLayout(function(){ta.execute(H.getDefaultParent(),0<pa.length?pa[0]:null)},!0,N);N=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==pa.length){H.view.validate();var oa=new mxHierarchicalLayout(H,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=B;oa.parallelEdgeSpacing=J;oa.interRankCellSpacing=P;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(H.getDefaultParent(),qa);H.moveCells(qa,ka,na)},!0,N);N=null}else if("organic"==
-T||"auto"==T&&qa.length>f.length){H.view.validate();var ya=new mxFastOrganicLayout(H);ya.forceConstant=3*B;ya.resetEdges=!1;var Da=ya.isVertexIgnored;ya.isVertexIgnored=function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(H);ra.spacing=J;this.executeLayout(function(){ya.execute(H.getDefaultParent());wa()},!0,N);N=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=N&&N()}}catch(ua){this.handleError(ua)}};EditorUi.prototype.getSearch=function(a){var c=
-"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=k.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)};var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-c-2*a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var l=c.init;c.init=function(){l.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,this.scale*a.height*c.height)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=
-f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
-c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
-var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
-null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
-this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
-var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);
-this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&
-(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||
-"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,l,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),m=Math.floor(g.width*k/c.view.scale),n=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(a.hideDialog(),
-"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<t?"&dpi="+t:"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,t):a.exportImage(k,!1,!0,!1,
-!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);
-return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
-var k={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var t=l[a];if("R"==t.substring(0,1)){var x=JSON.parse(decodeURIComponent(t.substring(1)));k[x[0]]={id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&
-(b[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):
-c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(f);c&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=
-this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,k=0;k<f.allowedDomains.length;k++)if(b=="https://"+f.allowedDomains[k]){e=!0;break}if(!e){c(null,"Invalid Call: "+d+" is not allowed.");return}}var l=a.functionArgs;Array.isArray(l)||(l=[]);if(f.isAsync)l.push(function(){c(Array.prototype.slice.apply(arguments))}),l.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,l);else{var t=this[d].apply(this,l);c([t])}}else c(null,"Invalid Call: "+
-d+" is not found.")}catch(y){c(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(v){null!=b&&b(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){e++;l()}),l=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(K){}"init"==e.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=e.event||d||(c?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],c=!1,l()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?m(e.resp[0]):k())}}catch(K){console.log(K)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};
-EditorUi.prototype.setDatabaseItem=function(a,b,d,e,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=c.transaction(k,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<k.length;c++)f.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,
-"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var f=c.transaction([d],
-"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),e=[];f.onsuccess=function(b){null==b.target.result?a(e):(e.push(b.target.result.value),b.target.result["continue"]())};f.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var f=c.transaction([d],"readonly").objectStore(d).getAllKeys();f.onsuccess=function(){a(f.result)};f.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=
-function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();
-null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();
-return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,k,l,t,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,k,l,t,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,l,t,q,x,y,D,z,E,A,C,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,e,k,l,t,q,x,y,D,z,E,A,C,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=
-function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,e,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,d,k,l){function t(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}x={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),t()):e();x=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);x=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function f(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),f=a.timeSince(d);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[f],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function m(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function n(b,d,e,k,l){function u(a,c,d){var f=document.createElement("li");f.className="geCommentAction";var e=document.createElement("a");e.className=
-"geCommentActionLnk";mxUtils.write(e,a);f.appendChild(e);mxEvent.addListener(e,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(f);d&&(f.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var f=0;f<b.replies.length;f++)d=d.nextSibling,a(b.replies[f])}var c=[],d=C;a(b);return{pdiv:d,replies:c}}function A(d,f,e,l,t){function q(){g(A);b.addReply(v,function(a){v.id=a;b.replies.push(v);p(A);e&&e()},function(b){u();m(A);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,t)}function u(){c(v,A,function(a){q()},!0)}var x=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var A=n(v,b.replies,x,k+1);f?u():q()}if(l||!b.isResolved){E.style.display="none";var C=document.createElement("div");C.className="geCommentContainer";C.setAttribute("data-commentId",b.id);C.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(C.style.backgroundColor="ghostWhite");
-var y=document.createElement("div");y.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;y.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";y.appendChild(F);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,b.user.displayName||"");F.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",b.id);f(b,
-P);F.appendChild(P);C.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");C.appendChild(y);b.isLocked&&(C.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";y.appendChild(D);v||b.isLocked||0!=k&&!q||u(mxResources.get("reply"),function(){A("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||v||b.isLocked||(u(mxResources.get("edit"),
-function(){function d(){c(b,C,function(){g(C);b.editComment(b.content,function(){p(C)},function(b){m(C);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),u(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(C);b.deleteComment(function(a){if(!0===a){a=C.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=C.querySelectorAll(".geCommentAction");for(a=
-0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);p(C);C.style.opacity="0.5"}else{c=B(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){m(C);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||b.isLocked||0!=k||u(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",f=B(b).replies,e="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<f.length;g++){f[g].style.backgroundColor=e;for(var k=f[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);G||(f[g].style.display="none")}t()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,
-!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});C.appendChild(y);null!=e?z.insertBefore(C,e.nextSibling):z.appendChild(C);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,n(y,b.replies,null,k+1,l);null!=x&&(x.comment.id==b.id?(l=b.content,b.content=x.comment.content,c(b,C,x.saveCallback,x.deleteOnCancel),b.content=l):null==x.comment.id&&x.comment.pCommentId==b.id&&(z.appendChild(x.div),c(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return C}}var v=
-!a.canComment(),q=a.canReplyToReplies(),x=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";y.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var C=D.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function d(){c(f,e,function(b){g(e);a.addComment(b,function(a){b.id=a;F.push(b);p(e)},function(b){m(e);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=a.newComment("",a.getCurrentUser()),e=n(f,F,null,0);d();b.preventDefault();mxEvent.consume(b)});A.appendChild(C)}C=D.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
-C.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(C);a.commentsRefreshNeeded()&&(C=D.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),
-mxEvent.addListener(C,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(C));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){l();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));y.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(E);E.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),n(F[a],F,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(z.appendChild(x.div),c(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
-(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
-A;this.window=new mxWindow(mxResources.get("comments"),y,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
-(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var K=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",K);this.destroy=function(){mxEvent.removeListener(window,"resize",K);this.window.destroy()}},ConfirmDialog=
-function(a,b,e,d,k,l,t,c,f,g,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(n.style.height="60px");mxUtils.write(n,b);p.appendChild(n);null!=g&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),n.appendChild(b),p.appendChild(n));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");l=mxUtils.button(l||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});l.className="geBtn";null!=c&&(l.innerHTML=c+"<br>"+l.innerHTML,l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.style.width="40%");a.editor.cancelFirst&&g.appendChild(l);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
-e(v.checked)});g.appendChild(q);null!=t?(q.innerHTML=t+"<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";a.editor.cancelFirst||g.appendChild(l);p.appendChild(g);f?(g.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),n.appendChild(k),p.appendChild(n),
-mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d=
+parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,m){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
+"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(y){null!=b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,m)}catch(D){null!=b&&b(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,m,k,p,n){n=null!=n?n:!0;p=b.background;p==mxConstants.NONE&&(p=null);k=b.getSvg(p,null,null,null,null,k);b.shadowVisible&&b.addSvgShadow(k);null!=a&&
+k.setAttribute("content",a);null!=d&&k.setAttribute("resource",d);if(null!=m)this.embedFonts(k,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(l){b(a)}}))}catch(g){b(a)}}))};
+EditorUi.prototype.exportImage=function(a,b,d,e,m,k,p,n,q,z,u,I){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,n):null,q,null==this.pages||0==this.pages.length,u)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,p,z,I)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,m){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+var l=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=Editor.parseDiagramNode(k[0]),null!=this.currentPage&&(a[k[0].getAttribute("id")]=this.currentPage.getId());else if(1<k.length){var g=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[k[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(k[0]),e=!1,n=1);for(;n<k.length;n++){var q=
+k[n].getAttribute("id");k[n].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(k[n]));a[q]=k[n].getAttribute("id");var B=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[B+1]));f.model.execute(new ChangePage(this,u,u,B,!0));g.push(u)}this.updatePageLinks(a,g)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=f.importGraphModel(l,b,d,e),null!=c))for(n=0;n<c.length;n++)this.updatePageLinksForCell(a,c[n])}finally{f.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return c};
+EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var e=c.getElementsByTagName("a"),k=!1,n=0;n<e.length;n++)f=e[n].getAttribute("href"),null!=f&&(e[n].setAttribute("href",this.updatePageLink(a,
+f)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(n=0;n<d.model.getChildCount(b);n++)this.updatePageLinksForCell(a,d.model.getChildAt(b,n))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,
+13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(p){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);
+try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var l=e.lastIndexOf("/");0<=l&&l<e.length&&(e=e.substring(l+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(D){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var m=new XMLHttpRequest;
+m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(B){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(y){d(y)}else try{""==m.responseType||"text"==m.responseType?d({message:m.responseText}):
+(c=new FileReader,c.onload=function(){d({message:JSON.parse(c.result).Message})},c.readAsText(m.response))}catch(y){d({})}});m.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(D){d(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
+var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||
+this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=
+function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");
+if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(g))try{var l=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(l[2]),g=parseFloat(l[3])}catch(I){f=f||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),f,g)}else e({message:mxResources.get("invalidInput")})}catch(I){e(I)}})}catch(p){e(p)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=
+b.width,f=b.height;if(0==a&&0==f){var g=c.result,l=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(m).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),f=parseFloat(k[0].getAttribute("height")))}d(c.result,a,f)}catch(G){e(G)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=
+c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,m,k,p){k=null!=k?k:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,
+b,d,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,b,d,k,!0);if(0<g.length)return g}catch(I){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",
+c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
+function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;m=null;c.getModel().beginUpdate();try{m=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");
+m.value=a;c.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=l.width;m.geometry.height=l.height}Graph.isLink(m.value)&&c.setLinkForCell(m,m.value);m.geometry.width+=c.gridSize;m.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};
+EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==
+this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,
+function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=
+mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,l=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,c.async("string").then(function(a){0==
+a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):l||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():
+(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,m,k,p,n,q,u,D){u=null!=u?u:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,e,u);null!=n&&n(c)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),q=!0)),q||(b=this.editor.graph,
+D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),u&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,m,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=q&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?(c=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=n&&n(null))}),p)):0==a.indexOf("PK")&&null!=q?(c=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u);n(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,
+u));c||null==n||n(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,m,k,p,n,q,u,D,I){e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>l){g=!0;break}var x=mxUtils.bind(this,function(){var g=this.editor.graph,l=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,b,d,f,e,g,l,m,
+k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,e,g,l,m,k,c,I)}catch(U){return this.handleError(U),null}});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,x=[],y=mxUtils.bind(this,function(a,c){x[a]=c;if(0==--q){this.spinner.stop();if(null!=n)n(x);else{var b=[];g.getModel().beginUpdate();try{for(var d=
+0;d<x.length;d++){var f=x[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}k(b)}}),z=0;z<t;z++)mxUtils.bind(this,function(c){var k=a[c];if(null!=k){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==p||p(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),x=mxUtils.parseXml(q),q=x.getElementsByTagName("svg");if(0<q.length){var q=q[0],v=I?null:q.getAttribute("content");
+null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?y(c,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var f=a[0],p=f.getAttribute("width"),q=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,q=null!=q&&"%"!=q.charAt(q.length-
+1)?parseFloat(q):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+q);else if(isNaN(p)||isNaN(q)){var v=u.split(" ");3<v.length&&(p=parseFloat(v[2]),q=parseFloat(v[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,p)),e/Math.max(1,q)),z=m(n,k.type,b+c*l,d+c*l,Math.max(1,Math.round(p*y)),Math.max(1,Math.round(q*y)),k.name);if(isNaN(p)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){p=Math.max(1,A.width);
+q=Math.max(1,A.height);z[0].geometry.width=p;z[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+p+" "+q);n=Editor.createSvgDataUri(mxUtils.getXml(f));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));g.setCellStyles("image",n,[z[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return z}}}catch(aa){}return null})):y(c,mxUtils.bind(this,function(){return m(v,"text/xml",b+c*l,d+c*l,0,0,k.name)}))}else y(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==
+k.type){var z=I?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var A=new Image;A.src=a.target.result;y(c,mxUtils.bind(this,function(){return m(z,"text/xml",b+c*l,d+c*l,A.width,A.height,k.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,p,n){y(c,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var t=f&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(e/p,e/n)):1;return m(g,k.type,b+c*l,d+c*l,Math.round(p*t),Math.round(n*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=
+a.target.result,m(n,k.type,b+c*l,d+c*l,240,160,k.name,function(a){y(c,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?m(null,k.type,b+c*l,d+c*l,240,160,k.name,function(a){y(c,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?n.readAsDataURL(k):n.readAsText(k)}})(z)});if(g){g=[];for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){f=a;x()},q)}else x()};EditorUi.prototype.confirmImageResize=
+function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=
+function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,m,k){m=null!=m?m:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(c/m,f/m);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),t=document.createElement("canvas");t.width=l;t.height=n;t.getContext("2d").drawImage(a,0,0,l,n);var q=t.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=l;u.height=
+n;var E=u.toDataURL();q!==E&&(b=q,c=l,f=n)}}}catch(F){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(m){if(null!=d)d(m);else throw m;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;"dark"==uiTheme&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,e.format,function(f,g,l){a.spinner.stop();
+b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=l,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=
+function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,g),m.height=Math.max(m.height,l),b.cellsResized([c],[m],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,
+config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,f){try{var e=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=e)this.editPlantUmlData(c,f,e);else if(e=this.graph.getAttributeForCell(c,"mermaidData"),null!=e)this.editMermaidData(c,f,e);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):
+d.apply(this,arguments)}}catch(H){a.handleError(H)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(E){a.handleError(E)}return b};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
+/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var n=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=
+c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};n.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?
+450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var p=b.getExportVariables;b.getExportVariables=function(){var c=p.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var q=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==
+c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),
+b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
+function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,
+Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&
+(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var I=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=I&&(I.parentNode.removeChild(I),I=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=I&&(I.parentNode.removeChild(I),I=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(m);var k=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),null==m&&(m=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||
+(k=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,e,g,!0,k,null,p))});k&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
+function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var k=
+e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
+"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
+"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(p){this.handleError(p)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(d,!0),a()}catch(p){this.handleError(p)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=
+null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var l="<meta "==g.substring(0,6),c=document.createElement("div");c.innerHTML=(l?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<
+g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(c,g),f=!1));l=l&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=l&&null==l.nextSibling&&l.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==l.nodeName&&(g=l.getAttribute("src"),null!=g&&(mxUtils.setTextContent(c,g),f=!1));f&&Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}l=c.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===
+l[0].getAttribute("data-lucid-type"))d=l[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):
+c.innerText);g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(E){}try{var l=c.getElementsByTagName("span"),n=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f);this.isCompatibleString(n)&&(g=!0,f=n)}catch(E){}try{var q=this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var u=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,
+u,u));else if(e&&1==q.getSelectionCount()){var y=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==q.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,f,[y]):(q.labelChanged(y,f),Graph.isLink(f)&&q.setLinkForCell(y,f));q.setSelectionCell(y)}else{var B=q.getInsertPoint();q.isMouseInsertPoint()&&(u=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,B.x+u,B.y+u,!0))}q.isSelectionEmpty()||
+(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),
+mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?
+d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
+function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=
+Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,
+b,d,e,m){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(C){this.handleError(C,
+mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
+d.type){var f=Editor.extractGraphModelFromPdf(a);null!=f&&(a=f)}this.spinner.stop();this.openLocalFile(a,b,e,m,null!=m?d:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(p){this.handleError(p)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
+window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d,e,m){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+a,b||this.defaultFilename,d,e,m))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=
+function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
+function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
+a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
+pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
+(a=Graph.decompress(a)))}catch(ea){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();
+var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(U){n.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:c,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var v=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,A=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=v;n.postMessage(JSON.stringify(b),"*")}),T=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(v)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);
+A(a)}),O=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=O){for(var N=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==O){J=this.updatePageRoot(this.pages[S]);break}C.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:N.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(J.root)}if(null!=g.layerIds){for(var ga=
+C.model,ja=ga.getChildCells(ga.getRoot()),k={},S=0;S<g.layerIds.length;S++)k[g.layerIds[S]]=!0;for(S=0;S<ja.length;S++)ga.setVisible(ja[S],k[ja[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){T(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){T(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?A("data:image/png;base64,"+a.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();x.xml=mxUtils.getXml(da);
+x.data=this.getFileData(null,null,!0,null,null,null,da);x.format=g.format}else if("html"==g.format)v=this.editor.getGraphXml(),x.data=this.getHtml(v,this.editor.graph),x.xml=mxUtils.getXml(v),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ba=this.editor.graph.background;ba==mxConstants.NONE&&(ba=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var W=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=
+Editor.createSvgDataUri(a);n.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,W,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var fa=this.editor.graph.getSvg(ba);this.embedFonts(fa,mxUtils.bind(this,
+function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){W(mxUtils.getXml(a))})):W(mxUtils.getXml(a))}))}return}n.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),
+null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){n.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){n.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==g.action?
+this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ka=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(ca){this.handleError(ca)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+e=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
+b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var k=this.createLoadMessage("load");k.xml=f;n.postMessage(JSON.stringify(k),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ka(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ka(a.responseText,f)}),""):null!=g&&"function"===
+typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ka(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ka(g,f))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var q=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){q.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:a,
+target:b,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var d=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),d=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),
+d=[],f=[],e={};if(0<c.length){var k={},n=null,q=null,u=null,D=null,I=null,y=null,B=null,E=null,F="",H="auto",G="auto",v=null,K=null,A=40,T=40,O=100,N=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(na):(J.setSelectionCells(na),J.scrollCellToVisible(J.getSelectionCell()))},ga=J.getFreeInsertPoint(),ja=ga.x,da=ga.y,ga=da,ba=null,W="auto",E=null,fa=[],ha=null,ka=null,U=0;U<c.length&&"#"==c[U].charAt(0);){a=c[U];for(U++;U<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[U].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(c[U].substring(1)),U++;if("#"!=a.charAt(1)){var ea=a.indexOf(":");if(0<ea){var Q=mxUtils.trim(a.substring(1,ea)),L=mxUtils.trim(a.substring(ea+1));"label"==Q?ba=J.sanitizeHtml(L):"labelname"==Q&&0<L.length&&"-"!=L?D=L:"labels"==Q&&0<L.length&&"-"!=L?I=JSON.parse(L):"style"==Q?n=L:"parentstyle"==Q?y=L:"stylename"==Q&&0<L.length&&"-"!=L?u=L:"styles"==Q&&0<L.length&&"-"!=L?q=JSON.parse(L):"identity"==Q&&0<L.length&&"-"!=L?B=L:"parent"==Q&&0<L.length&&"-"!=L?E=L:
+"namespace"==Q&&0<L.length&&"-"!=L?F=L:"width"==Q?H=L:"height"==Q?G=L:"left"==Q&&0<L.length?v=L:"top"==Q&&0<L.length?K=L:"ignore"==Q?ka=L.split(","):"connect"==Q?fa.push(JSON.parse(L)):"link"==Q?ha=L:"padding"==Q?N=parseFloat(L):"edgespacing"==Q?A=parseFloat(L):"nodespacing"==Q?T=parseFloat(L):"levelspacing"==Q?O=parseFloat(L):"layout"==Q&&(W=L)}}}if(null==c[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var ca=this.editor.csvToArray(c[U]),Q=ea=null,L=[],R=0;R<ca.length;R++)B==ca[R]&&
+(ea=R),E==ca[R]&&(Q=R),L.push(mxUtils.trim(ca[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ba&&(ba="%"+L[0]+"%");if(null!=fa)for(var Y=0;Y<fa.length;Y++)null==k[fa[Y].to]&&(k[fa[Y].to]={});B=[];for(R=U+1;R<c.length;R++){var Z=this.editor.csvToArray(c[R]);if(null==Z){var Ca=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(Ca+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<Z.length&&B.push(Z)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var Z=
+B[R],M=null,ma=null!=ea?F+Z[ea]:null;null!=ma&&(M=J.model.getCell(ma));var c=null!=M,aa=new mxCell(ba,new mxGeometry(ja,ga,0,0),n||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ma;for(var P=0;P<Z.length;P++)J.setAttributeForCell(aa,L[P],Z[P]);if(null!=D&&null!=I){var ia=I[aa.getAttribute(D)];null!=ia&&J.labelChanged(aa,ia)}if(null!=u&&null!=q){var la=q[aa.getAttribute(u)];null!=la&&(aa.style=la)}J.setAttributeForCell(aa,"placeholders","1");aa.style=J.replacePlaceholders(aa,aa.style);c&&(J.model.setGeometry(M,
+aa.geometry),J.model.setStyle(M,aa.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=aa;if(!c)for(Y=0;Y<fa.length;Y++)k[fa[Y].to][M.getAttribute(fa[Y].to)]=M;null!=ha&&"link"!=ha&&(J.setLinkForCell(M,M.getAttribute(ha)),J.setAttributeForCell(M,ha,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var sa=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=v&&null!=M.getAttribute(v)&&(M.geometry.x=ja+parseFloat(M.getAttribute(v))),null!=K&&null!=M.getAttribute(K)&&(M.geometry.y=
+da+parseFloat(M.getAttribute(K))),"@"==H.charAt(0)&&null!=M.getAttribute(H.substring(1))?M.geometry.width=parseFloat(M.getAttribute(H.substring(1))):M.geometry.width="auto"==H?sa.width+N:parseFloat(H),"@"==G.charAt(0)&&null!=M.getAttribute(G.substring(1))?M.geometry.height=parseFloat(M.getAttribute(G.substring(1))):M.geometry.height="auto"==G?sa.height+N:parseFloat(G),ga+=M.geometry.height+T);c?(null==e[ma]&&(e[ma]=[]),e[ma].push(M)):(E=null!=Q?J.model.getCell(F+Z[Q]):null,d.push(M),null!=E?(E.style=
+J.replacePlaceholders(E,y),J.addCell(M,E)):f.push(J.addCell(M)))}for(var qa=f.slice(),na=f.slice(),Y=0;Y<fa.length;Y++)for(var Da=fa[Y],R=0;R<d.length;R++){var M=d[R],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(J.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));
+var l="target"==c.placeholders==!c.invert?e:a,l=null!=c.style?J.replacePlaceholders(l,c.style):J.createCurrentEdgeStyle(),g=J.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}na.push(g);
+mxUtils.remove(c.invert?a:e,qa)}}});wa(M,M,Da);if(null!=e[M.id])for(P=0;P<e[M.id].length;P++)wa(M,e[M.id][P],Da)}if(null!=ka)for(R=0;R<d.length;R++)for(M=d[R],P=0;P<ka.length;P++)J.setAttributeForCell(M,mxUtils.trim(ka[P]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(J);ra.spacing=A;var xa=function(){0<ra.spacing&&ra.execute(J.getDefaultParent());for(var a=0;a<f.length;a++){var b=J.getCellGeometry(f[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==H&&(b.width=Math.round(J.snap(b.width)));
+"auto"==G&&(b.height=Math.round(J.snap(b.height)))}};if("["==W.charAt(0)){var ya=S;J.view.validate();this.executeLayoutList(JSON.parse(W),function(){xa();ya()});S=null}else if("circle"==W){var pa=new mxCircleLayout(J);pa.resetEdges=!1;var za=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return za.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){pa.execute(J.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==W||"verticaltree"==W||"auto"==W&&na.length==
+2*f.length-1&&1==qa.length){J.view.validate();var oa=new mxCompactTreeLayout(J,"horizontaltree"==W);oa.levelDistance=T;oa.edgeRouting=!1;oa.resetEdges=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==W||"verticalflow"==W||"auto"==W&&1==qa.length){J.view.validate();var Aa=new mxHierarchicalLayout(J,"horizontalflow"==W?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Aa.intraCellSpacing=T;Aa.parallelEdgeSpacing=A;
+Aa.interRankCellSpacing=O;Aa.disableEdgeStyle=!1;this.executeLayout(function(){Aa.execute(J.getDefaultParent(),na);J.moveCells(na,ja,da)},!0,S);S=null}else if("organic"==W||"auto"==W&&na.length>f.length){J.view.validate();var ta=new mxFastOrganicLayout(J);ta.forceConstant=3*T;ta.resetEdges=!1;var ua=ta.isVertexIgnored;ta.isVertexIgnored=function(a){return ua.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(J);ra.spacing=A;this.executeLayout(function(){ta.execute(J.getDefaultParent());
+xa()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
+n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
+2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),
+b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&
+(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);
+this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=
+function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);
+this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=
+d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,n,p){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,n)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),
+m=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==
+d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,n,!0,!1,null,null,p):a.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));
+b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+e.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(a=0;a<n.length;a++){var q=n[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));k[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(z){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));
+c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+
+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(f);c&&k.apply(this,
+arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),
+"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var n=a.functionArgs;Array.isArray(n)||(n=[]);if(e.isAsync)n.push(function(){c(Array.prototype.slice.apply(arguments))}),n.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,n);else{var q=this[d].apply(this,n);
+c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(z){c(null,"Invalid Call: An error occured, "+z.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(p){null!=b&&b(p)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
+"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
+function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(G){console.log(G)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(G){console.log(G)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
+{};try{f=JSON.parse(a.data)}catch(v){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(v){console.log(v)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(m){null!=b&&b(m)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=c.transaction(k,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<k.length;c++)f.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(x){null!=e&&e(x)}}),e)};EditorUi.prototype.removeDatabaseItem=
+function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(p){null!=d&&d(p)}}),d)};EditorUi.prototype.getDatabaseItems=
+function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(p){null!=b&&b(p)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();
+e.onsuccess=function(){a(e.result)};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
+null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
+a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
+function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,k,n,p,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,k,n,p,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,n,p,q,u,z,D,I,y,B,E,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,e,k,n,p,q,
+u,z,D,I,y,B,E,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};
+EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,
+b,d,e,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=
+function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,e,d,k,n){function u(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function q(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}x={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),u()):e();x=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);x=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function c(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function f(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function g(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function m(b,d,e,k,n){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});T.appendChild(e);d&&(e.style.display="none")}function y(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=B;a(b);return{pdiv:d,replies:c}}function A(c,d,e,n,p){function u(){f(A);b.addReply(v,function(a){v.id=a;b.replies.push(v);l(A);e&&e()},function(b){t();g(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,p)}function t(){q(v,A,function(a){u()},!0)}var x=y().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var A=m(v,b.replies,x,k+1);d?t():u()}if(n||!b.isResolved){I.style.display="none";var B=document.createElement("div");B.className="geCommentContainer";B.setAttribute("data-commentId",b.id);B.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(B.style.backgroundColor="ghostWhite");
+var z=document.createElement("div");z.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;z.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";z.appendChild(C);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");C.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);c(b,
+F);C.appendChild(F);B.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,b.content||"");B.appendChild(z);b.isLocked&&(B.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";z.appendChild(T);t||b.isLocked||0!=k&&!p||v(mxResources.get("reply"),function(){A("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||t||b.isLocked||(v(mxResources.get("edit"),
+function(){function c(){q(b,B,function(){f(B);b.editComment(b.content,function(){l(B)},function(b){g(B);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){f(B);b.deleteComment(function(a){if(!0===a){a=B.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=B.querySelectorAll(".geCommentAction");for(a=
+0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(B);B.style.opacity="0.5"}else{c=y(b).replies;for(a=0;a<c.length;a++)D.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(b){g(B);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));t||b.isLocked||0!=k||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=y(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);E||(e[g].style.display="none")}u()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,
+!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});B.appendChild(z);null!=e?D.insertBefore(B,e.nextSibling):D.appendChild(B);for(e=0;null!=b.replies&&e<b.replies.length;e++)z=b.replies[e],z.isResolved=b.isResolved,m(z,b.replies,null,k+1,n);null!=x&&(x.comment.id==b.id?(n=b.content,b.content=x.comment.content,q(b,B,x.saveCallback,x.deleteOnCancel),b.content=n):null==x.comment.id&&x.comment.pCommentId==b.id&&(D.appendChild(x.div),q(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return B}}var t=
+!a.canComment(),p=a.canReplyToReplies(),x=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;D.style.bottom=parseInt(z)+7+"px";C.appendChild(D);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(I,mxResources.get("noCommentsFound"));var y=document.createElement("div");y.className="geToolbarContainer geCommentsToolbar";y.style.height=z;y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(y.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter="none");if(!t){var B=z.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){q(d,e,function(b){f(e);a.addComment(b,function(a){b.id=a;F.push(b);l(e)},function(b){g(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=m(d,F,null,0);c();b.preventDefault();mxEvent.consume(b)});y.appendChild(B)}B=z.cloneNode();B.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+B.setAttribute("title",mxResources.get("showResolved"));var E=!1;"dark"==uiTheme&&(B.style.filter="invert(100%)");mxEvent.addListener(B,"click",function(a){this.className=(E=!E)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});y.appendChild(B);a.commentsRefreshNeeded()&&(B=z.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',B.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(B.style.filter="invert(100%)"),
+mxEvent.addListener(B,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),y.appendChild(B));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){n();a.preventDefault();mxEvent.consume(a)}),y.appendChild(z));C.appendChild(y);var F=[],H=mxUtils.bind(this,function(){this.hasError=
+!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),c=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(A){a.handleError(A)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(I);I.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),m(F[a],F,null,0,E);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(D.appendChild(x.div),q(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;y=mxUtils.bind(this,function(){function a(b){var e=d[b.id];if(null!=e)for(c(b,e),e=0;null!=b.replies&&e<b.replies.length;e++)a(b.replies[e])}if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),d={},e=0;e<b.length;e++){var f=b[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<F.length;e++)a(F[e])}});setInterval(y,6E4);this.refreshCommentsTime=
+y;this.window=new mxWindow(mxResources.get("comments"),C,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},ConfirmDialog=
+function(a,b,e,d,k,n,u,q,c,f,g){var l=document.createElement("div");l.style.textAlign="center";g=null!=g?g:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=g+"px";m.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(m.style.height="60px");mxUtils.write(m,b);l.appendChild(m);null!=f&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",f),m.appendChild(b),l.appendChild(m));f=document.createElement("div");
+f.style.textAlign="center";f.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(t.checked)});n.className="geBtn";null!=q&&(n.innerHTML=q+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");a.editor.cancelFirst&&f.appendChild(n);var p=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
+e(t.checked)});f.appendChild(p);null!=u?(p.innerHTML=u+"<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";a.editor.cancelFirst||f.appendChild(n);l.appendChild(f);c?(f.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),m.appendChild(k),l.appendChild(m),
+mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):f.style.marginTop="12px";this.init=function(){p.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
@@ -3672,11 +3674,11 @@ EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.page
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 a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
-this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,c=0;c<e.length;c++)if(e[c]instanceof SelectPage||e[c]instanceof RenamePage||e[c]instanceof MovePage||e[c]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),l=a.getAttribute("background"),t=a.getAttribute("backgroundImage"),t=null!=t&&0<t.length?JSON.parse(t):null,c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:null,backgroundImage:null!=t?new mxImage(t.src,t.width,t.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),u=a.getAttribute("backgroundImage"),u=null!=u&&0<u.length?JSON.parse(u):null,q=a.getAttribute("extFonts");if(q)try{q=q.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(c){console.log("ExtFonts format error: "+c.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=u?new mxImage(u.src,u.width,u.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:q||[]}};
Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
@@ -3691,85 +3693,85 @@ Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var d="extFont_"+a;if(null==
d=!0;for(k=0;k<e.length;k++)if(e[k].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:b})}}};
EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var e=this.editor.extractGraphModel(a.node,null,b),d=Editor.extractParserError(e);if(d)throw Error(d);null!=e?(a.graphModelNode=e,a.viewState=this.editor.graph.createViewState(e),d=new mxCodec(e.ownerDocument),a.root=d.decode(e).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){e=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(e))throw Error(d);null!=e&&(a.graphModelNode=
e)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(l){this.handleError(l)}};
+EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(n){this.handleError(n)}};
EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(l){this.handleError(l)}return e};
+EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(n){this.handleError(n)}return e};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage,l+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
-this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var c=this.createControlTab(4,"&nbsp;&#10095;");
-c.style.position="absolute";c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(t,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+e)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
+this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var 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 q=this.createControlTab(4,"&nbsp;&#10095;");
+q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(u,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(u,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(u,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
"none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
-EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=
-0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=this.currentPage;null!=d&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
-function(){this.removePage(d)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
+EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=
+0;d<this.pages.length;d++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var c=this.currentPage;null!=c&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
+function(){this.removePage(c)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),l=a.getId();e.setAttribute("title",k+(null!=l?" ("+l+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var t=new mxPopupMenu(this.createPageMenu(a));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);this.resetCurrentMenu();t.destroy()});var c=mxEvent.getClientX(l),f=mxEvent.getClientY(l);t.popup(c,f,null,l);this.setCurrentMenu(t,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),n=a.getId();e.setAttribute("title",k+(null!=n?" ("+n+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var u=new mxPopupMenu(this.createPageMenu(a));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 q=mxEvent.getClientX(n),c=mxEvent.getClientY(n);u.popup(q,c,null,n);this.setCurrentMenu(u,b)}mxEvent.consume(n)}}))};
EditorUi.prototype.getLinkForPage=function(a,b,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),k=k+((0==k.length?"?":"&")+"page-id="+a.getId());null!=b&&(k+="&"+b.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+"#"+d.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){var k=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);null!=this.getLinkForPage(a)&&(e.addSeparator(d),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,f,e,m){b=this.createUrlParameters(b,d,c,f,e,m);c||b.push("hide-pages=1");k.isSelectionEmpty()||(c=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,e=k.view.scale,c.width/=e,c.height/=e,c.x=c.x/e-d.x,c.y=c.y/e-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
-f=new EmbedDialog(this,this.getLinkForPage(a,b,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,e,c,f,g){b=this.createUrlParameters(b,d,e,c,f,g);e||b.push("hide-pages=1");k.isSelectionEmpty()||(e=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,f=k.view.scale,e.width/=f,e.height/=f,e.x=e.x/f-d.x,e.y=e.y/f-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
+c=new EmbedDialog(this,this.getLinkForPage(a,b,c));this.showDialog(c.container,440,240,!0,!0);c.init()}))})));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),d))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,l,t,c){e=null!=e?e:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var d=l.slice(),g=0;g<l.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(l[g]),"treeFolding","0")&&this.foldTreeCell(b,l[g]);l=d;l=a.apply(this,arguments)}finally{this.model.endUpdate()}return l};Graph.prototype.foldTreeCell=
-function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,e){null!=e&&d.push(e);a!=b&&d.push(a);return a==b||!this.model.isCollapsed(a)}));this.model.setCollapsed(b,a);for(var e=0;e<d.length;e++)this.model.setVisible(d[e],!a)}finally{this.model.endUpdate()}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return x.isVertex(a)&&
-e(a)}function b(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function c(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),
-null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var d=q.model.getParent(a),e=q.getIncomingEdges(a),f=q.cloneCells([e[0],a]);q.model.setTerminal(f[0],
-q.model.getTerminal(e[0],!0),!0);var g=c(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-
-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(e[0],!0));if(null!=p){for(var t=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,u=k=e=0;u<p.length;u++){var x=q.model.getTerminal(p[u],!1);if(g==c(x)){var v=q.view.getState(x);x!=a&&null!=v&&(t&&b!=v.getCenterX()<l.getCenterX()||!t&&b!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,
-(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}t?k=0:e=0;for(u=0;u<p.length;u++)if(x=q.model.getTerminal(p[u],!1),g==c(x)&&(v=q.view.getState(x),x!=a&&null!=v&&(t&&b!=v.getCenterX()<l.getCenterX()||!t&&b!=v.getCenterY()<l.getCenterY()))){var A=[];q.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});q.moveCells(A,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,d)}finally{q.model.endUpdate()}}function g(a){q.model.beginUpdate();try{var b=c(a),d=q.getIncomingEdges(a),
-e=q.cloneCells([d[0],a]);q.model.setTerminal(d[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);q.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&
-(m=0);q.moveCells(k,l,m);return q.addCells(e,f)}finally{q.model.endUpdate()}}function m(a,b){q.model.beginUpdate();try{var d=q.model.getParent(a),e=q.getIncomingEdges(a),f=c(a);0==e.length&&(e=[q.createEdge(d,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],
-[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(fa){}}var e=q.getOutgoingEdges(a),n=d.geometry,k=[];q.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var t=q.view.getBounds(k),u=q.view.translate,x=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-g[1].geometry.width)/
-2:(t.x+t.width)/x-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(t.x+t.width)/x-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==t?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(t.y+t.height)/x-u.y+-n.y+
-10);return q.addCells(g,d)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var d=c(a),e=b==mxConstants.DIRECTION_EAST||
-b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=b?v.actions.get("selectParent").funct():d==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(d=q.getIncomingEdges(a),null!=d&&0<d.length&&(e=p(q.model.getTerminal(d[0],!0),e,a),d=q.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&q.setSelectionCell(e[d].cell)))))}
-var v=this,q=v.editor.graph,x=q.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
-v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=
-[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,
-c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=q.removeCells;q.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];x.isEdge(g)&&e(g)&&(d.push(g),g=x.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),
-b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var z=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,
-b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||
-q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var t=q.getIncomingEdges(b[0]);if(0<t.length){var u=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=u){var x=q.view.getState(m);null!=x&&(c=(x.getCenterX()-u.getCenterX())/q.view.scale,d=(x.getCenterY()-u.getCenterY())/q.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var A=v.sidebar.dropAndConnect;
-v.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=
-v.onKeyDown;v.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?g(q.getSelectionCell()):m(q.getSelectionCell()):13==b.which&&(c=f(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),
-q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=q.connectVertex;q.connectVertex=function(b,d,e,k,l,n,p){var t=q.getIncomingEdges(b);if(a(b)){var u=c(b),x=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,v=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?m(b,d):x==v?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};q.getSubtree=function(c){var d=
-[c];!b(c)&&!a(c)||t(c)||q.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingEdges(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();
-mxEvent.consume(a)})))};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.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 u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=a?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.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 a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
-new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
-a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);e.insertEdge(k,!1);var p=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};');
-p.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;b.insertEdge(n,!0);p.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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};');
-v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(k);a.insert(n);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,n,u,q){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var c=n.slice(),d=0;d<n.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[d]),"treeFolding","0")&&this.foldTreeCell(b,n[d]);n=c;n=a.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
+function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,c){null!=c&&d.push(c);a!=b&&d.push(a);return a==b||!this.model.isCollapsed(a)}));this.model.setCollapsed(b,a);for(var e=0;e<d.length;e++)this.model.setVisible(d[e],!a)}finally{this.model.endUpdate()}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return x.isVertex(a)&&
+e(a)}function b(a){var b=!1;null!=a&&(b="1"==p.getCurrentCellStyle(a).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function q(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),
+null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],
+p.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=p.view.getState(a),l=p.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-
+10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var n=p.getOutgoingEdges(p.model.getTerminal(d[0],!0));if(null!=n){for(var u=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var x=p.model.getTerminal(n[t],!1);if(f==q(x)){var y=p.view.getState(x);x!=a&&null!=y&&(u&&b!=y.getCenterX()<k.getCenterX()||!u&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,y)&&(d=10+Math.max(d,(Math.min(m.x+m.width,y.x+y.width)-Math.max(m.x,y.x))/l),g=10+Math.max(g,
+(Math.min(m.y+m.height,y.y+y.height)-Math.max(m.y,y.y))/l))}}u?g=0:d=0;for(t=0;t<n.length;t++)if(x=p.model.getTerminal(n[t],!1),f==q(x)&&(y=p.view.getState(x),x!=a&&null!=y&&(u&&b!=y.getCenterX()<k.getCenterX()||!u&&b!=y.getCenterY()<k.getCenterY()))){var v=[];p.traverse(y.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function f(a){p.model.beginUpdate();try{var b=q(a),c=p.getIncomingEdges(a),
+d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&
+(l=0);p.moveCells(g,k,l);return p.addCells(d,e)}finally{p.model.endUpdate()}}function g(a,b){p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=q(a);0==d.length&&(d=[p.createEdge(c,null,"",null,null,p.createCurrentEdgeStyle())],e=b);var f=p.cloneCells([d[0],a]);p.model.setTerminal(f[0],a,!0);if(null==p.model.getTerminal(f[0],!1)){p.model.setTerminal(f[0],f[1],!1);var g=p.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),l;for(l in k)p.setCellStyles(l,k[l],
+[f[0]]),"edgeStyle"==l&&"elbowEdgeStyle"==k[l]&&p.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[f[0]])}catch(U){}}var d=p.getOutgoingEdges(a),m=c.geometry,g=[];p.view.currentRoot==c&&(m=new mxRectangle);for(k=0;k<d.length;k++){var n=p.model.getTerminal(d[k],!1);null!=n&&g.push(n)}var u=p.view.getBounds(g),t=p.view.translate,x=p.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/
+2:(u.x+u.width)/x-t.x-m.x+10,f[1].geometry.y+=f[1].geometry.height-m.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(u.x+u.width)/x-t.x+-m.x+10,f[1].geometry.y-=f[1].geometry.height+m.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+m.x+40):f[1].geometry.x+(f[1].geometry.width-m.x+40),f[1].geometry.y=null==u?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(u.y+u.height)/x-t.y+-m.y+
+10);return p.addCells(f,c)}finally{p.model.endUpdate()}}function l(a,b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||
+b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=l(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}
+var t=this,p=t.editor.graph,x=p.getModel(),C=t.menus.createPopupMenu;t.menus.createPopupMenu=function(b,c,d){C.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(p.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(p.getSelectionCell())&&(b.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
+t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=
+[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,
+c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+D");var z=p.removeCells;p.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];x.isEdge(g)&&e(g)&&(d.push(g),g=x.getTerminal(g,!1));if(a(g)){var k=[];p.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=p.getIncomingEdges(b[f]),
+b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return z.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=p.duplicateCells;p.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=D.call(this,
+b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=p.getIncomingEdges(k[e]),g=p.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,p.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var I=p.moveCells;p.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<b.length;q++)if(a(b[q])||
+p.model.isEdge(b[q])&&null==p.model.getTerminal(b[q],!0)){f=p.model.getParent(b[q]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var u=p.getIncomingEdges(b[0]);if(0<u.length){var t=p.view.getState(p.model.getTerminal(u[0],!0));if(null!=t){var x=p.view.getState(m);null!=x&&(c=(x.getCenterX()-t.getCenterX())/p.view.scale,d=(x.getCenterY()-t.getCenterY())/p.view.scale)}}}}l=I.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))a(m)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(a(b[q])&&(u=p.getIncomingEdges(b[q]),0<u.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==p.getIncomingEdges(l[q]).length){n=m;if(null==n||n==p.model.getParent(b[q]))n=p.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,p.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var y=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(b,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=y.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=p.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var B={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},E=
+t.onKeyDown;t.onKeyDown=function(b){try{if(p.isEnabled()&&!p.isEditing()&&a(p.getSelectionCell())&&1==p.getSelectionCount()){var d=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==b.which?d=mxEvent.isShiftDown(b)?f(p.getSelectionCell()):g(p.getSelectionCell()):13==b.which&&(d=c(p.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=d&&0<d.length)1==d.length&&p.model.isEdge(d[0])?p.setSelectionCell(p.model.getTerminal(d[0],!1)):p.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())),
+p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=B[b.keyCode];null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(m(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(b))}}catch(N){t.handleError(N)}mxEvent.isConsumed(b)||E.apply(this,arguments)};var F=p.connectVertex;p.connectVertex=function(b,d,e,k,l,m,n){var u=p.getIncomingEdges(b);if(a(b)){var t=q(b),x=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,y=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return t==d||0==u.length?g(b,d):x==y?f(b):c(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};p.getSubtree=function(c){var d=
+[c];!b(c)&&!a(c)||u(c)||p.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingEdges(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;t.hoverIcons.reset();
+mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.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 v=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){v.apply(this,arguments);null!=this.moveHandle&&
+(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.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 a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
+new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+d.vertex=!0;var 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;b.insertEdge(c,!0);d.insertEdge(c,!1);a.insert(c);a.insert(b);a.insert(d);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+d.vertex=!0;var 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;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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;b.insertEdge(g,!0);e.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 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;b.insertEdge(m,!0);k.insertEdge(m,!1);var t=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};');
+t.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;b.insertEdge(p,!0);t.insertEdge(p,!1);a.insert(c);a.insert(g);a.insert(m);a.insert(p);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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};');
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-a.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"};');b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var c=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"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);g.insertEdge(k,!1);a.insert(e);a.insert(k);a.insert(d);a.insert(c);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(a,"treeRoot",
+a.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"};');b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+e.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;d.insertEdge(c,!0);e.insertEdge(c,!1);var f=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"};');f.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;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;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.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.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;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
+b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.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;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,c.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||
"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,
@@ -3782,20 +3784,20 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;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=this.tabContainerHeight+"px");l.apply(this,arguments)};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var c=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
-e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):c.apply(this,arguments)};var f=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){f.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
-"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var g=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){g.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");n.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
+e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var c=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){c.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var f=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){f.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
-"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
-!0;m.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
+"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
+!0;g.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
-this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
+this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);p.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+this.menus.findWindow=null);l.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){m.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");
c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,
@@ -3806,12 +3808,12 @@ c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs")
c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);c.menus.addSubmenu("units",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,
function(a,b){c.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);c.menus.addSubmenu("table",a,d);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,
function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",
-b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
+b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}p=n.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=n.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);b=c("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([b,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=e&&(b=l.actions.get("undo"),a=l.actions.get("redo"),b=d("",b.funct,null,mxResources.get("undo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
@@ -3819,58 +3821,58 @@ a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;b
f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=e?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=e?d("",b.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==S&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor=
-"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),S=b),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=S&&(S.parentNode.removeChild(S),S=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=e||null!=urlParams.clibs||
-null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor=
+"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),O=b),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}p.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=e||null!=urlParams.clibs||
+null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
-l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var J=
-l.menus.get("viewZoom");if(null!=J){this.tabContainer.style.right="70px";var B=t.addMenu("100%",J.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
-"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);J=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);l.editor.addListener("resetGraphView",J);l.editor.addListener("pageSelected",J);var P=l.setGraphEnabled;l.setGraphEnabled=function(){P.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
-k.appendChild(u);l.updateTabContainer();var S=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,l,t){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=l;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\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\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\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\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
-GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
-GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
-this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;
-this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,
-null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
-mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var c=this.xmlNode.getElementsByTagName("diagram");if(0<c.length){if(null!=this.pageId)for(var e=0;e<c.length;e++)if(this.pageId==c[e].getAttribute("id")){this.currentPage=e;break}var g=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=c[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+
-1:"pagecount"==a?c.length:g.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
-[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
-!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,
-function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}};
+l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,v=document.createElement("div");v.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
+l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var A=t.addMenu("100%",K.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";A.style.backgroundRepeat="no-repeat";A.style.backgroundColor="#ffffff";A.style.paddingRight="10px";A.style.display="block";A.style.position="absolute";A.style.textDecoration="none";A.style.textDecoration=
+"none";A.style.right="0px";A.style.bottom="0px";A.style.overflow="hidden";A.style.visibility="hidden";A.style.textAlign="center";A.style.color="#000";A.style.fontSize="12px";A.style.color="#707070";A.style.width="59px";A.style.cursor="pointer";A.style.borderTop="1px solid lightgray";A.style.borderLeft="1px solid lightgray";A.style.height=parseInt(l.tabContainerHeight)-1+"px";A.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";v.appendChild(A);K=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var T=l.setGraphEnabled;l.setGraphEnabled=function(){T.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}v.appendChild(l.tabContainer);v.appendChild(n);v.appendChild(l.diagramContainer);
+k.appendChild(v);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,n,u){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=n;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\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\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\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\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.center=!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.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;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.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?
+this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:
+!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});
+this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);
+var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var c=0;c<e.length;c++)if(this.pageId==e[c].getAttribute("id")){this.currentPage=c;break}var f=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==
+a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:"pagecount"==a?e.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};
+c=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)});this.addListener("xmlNodeChanged",c);c();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||
+1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&
+a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);
+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"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),n=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(n.disconnect(),d())}));n.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),
-d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),
+c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+
-2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var l=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(l);this.handlingResize||(l=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||
-9>=document.documentMode||this.graph.addListener("size",d);var t=mxUtils.bind(this,function(c){c=null!=c?c:new mxPoint;var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)?(c=null,null!=e&&b.height+2*this.graph.border>e-2&&(c=(e-2*this.graph.border-
-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+c.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+c.y),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(a){b=this.graph.getGraphBounds();
-k=null;t(a)}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var l=null!=b?b.getModel():null,t=a.getModel();t.beginUpdate();try{for(var c=t.getChildCount(t.root),f=0;f<c;f++)t.setVisible(t.getChildAt(t.root,f),null!=b?l.isVisible(l.getChildAt(l.root,f)):!1);if(null==l)if(k)for(f=0;f<d.length;f++)t.setVisible(t.getCell(d[f]),!0);else for(f=0;f<e.length;f++)t.setVisible(t.getChildAt(t.root,
-parseInt(e[f])),!0)}finally{t.endUpdate()}}};
+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||
+9>=document.documentMode||this.graph.addListener("size",d);var u=mxUtils.bind(this,function(d){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)?(d=null,null!=e&&b.height+2*this.graph.border>e-2&&(d=(e-2*this.graph.border-
+2)/b.height),this.fitGraph(d)):this.widthIsEmpty||null!=d||0!=this.graphConfig.resize||""==a.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+d.y),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(u,0):u();this.positionGraph=
+function(a){b=this.graph.getGraphBounds();k=null;u(a)}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var n=null!=b?b.getModel():null,u=a.getModel();u.beginUpdate();try{for(var q=u.getChildCount(u.root),c=0;c<q;c++)u.setVisible(u.getChildAt(u.root,c),null!=b?n.isVisible(n.getChildAt(n.root,c)):!1);if(null==n)if(k)for(c=0;c<d.length;c++)u.setVisible(u.getCell(d[c]),!0);else for(c=0;c<e.length;c++)u.setVisible(u.getChildAt(u.root,
+parseInt(e[c])),!0)}finally{u.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);m++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),t=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(t(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){t(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var c=this.graph,f=c.getTolerance();c.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=c.container.scrollLeft;this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<f&&Math.abs(this.scrollTop-c.container.scrollTop)<f&&Math.abs(this.startX-b.getGraphX())<f&&Math.abs(this.startY-b.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?l():t(30))}})}for(var g=this.toolbarItems,m=0,p=null,n=null,v=0;v<g.length;v++){var q=g[v];if("pages"==q){n=b.ownerDocument.createElement("div");
-n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(n);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";q=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=n.style.display;y.style.display=n.style.display});this.addListener("graphChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),
-p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=z.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);p.style.left=b.x+a.left+
-"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(q=this.graphConfig["toolbar-buttons"][q],
-null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
-70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var E=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),
-p=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==p)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()};
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),u=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(u(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){u(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){u(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?n():u(30))}})}for(var f=this.toolbarItems,g=0,l=null,m=null,t=0;t<f.length;t++){var p=f[t];if("pages"==p){m=b.ownerDocument.createElement("div");
+m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(m);var C=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";p=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=m.style.display;C.style.display=m.style.display});this.addListener("graphChanged",p);p()}else if("zoom"==p)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==p){if(this.layersEnabled){var z=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=l)l.parentNode.removeChild(l),
+l=null;else{l=this.graph.createLayersDialog();mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=D.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+a.left+
+"px";l.style.top=b.y+a.bottom+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){D.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});D.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==p?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(p=this.graphConfig["toolbar-buttons"][p],
+null!=p&&a(null==p.enabled||p.enabled?p.handler:function(){},p.image,p.title,p.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.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;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
+70),e.appendChild(f),this.filename=f);this.minToolbarWidth=34*g;var I=b.style.border,f=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
+c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==I&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),
+l=null);b.style.border=I});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==l)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",f):f()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3879,21 +3881,21 @@ window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
-"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),t=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;t.apply(this,arguments)};var c=k.editor.graph,f=c.container;f.style.overflow="hidden";this.lightboxChrome?(f.style.border="1px solid #c0c0c0",f.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",l)):(b.style.display="none",e.style.display="none");var g=this;c.getImageFromBundles=function(a){return g.getImageUrl(a)};var m=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=m.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
-this.graphConfig.move&&(c.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(f.style,"border-radius","4px"),f.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(f.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(f.style,"transition","all .25s ease-in-out"));this.addClickHandler(c,k);window.setTimeout(mxUtils.bind(this,function(){f.style.outline="none";
-f.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(f);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(f.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(f.style.position="absolute",f.style.display="block",f.style.left=
-a.x+"px",f.style.top=a.y+"px",f.style.width=document.body.clientWidth-80+"px",f.style.height=document.body.clientHeight-80+"px",f.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(c,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var n=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),u=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",n);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
+!0;u.apply(this,arguments)};var q=k.editor.graph,c=q.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",n)):(b.style.display="none",e.style.display="none");var f=this;q.getImageFromBundles=function(a){return f.getImageUrl(a)};var g=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=g.apply(this,arguments);a.getImageFromBundles=function(a){return f.getImageUrl(a)};return a};
+this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(c.style,"border-radius","4px"),c.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,k);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";
+c.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(c.style.position="absolute",c.style.display="block",c.style.left=
+a.x+"px",c.style.top=a.y+"px",c.style.width=document.body.clientWidth-80+"px",c.style.height=document.body.clientHeight-80+"px",c.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
GraphViewer.prototype.updateTitle=function(a){a=a||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",a);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,a),this.filename.setAttribute("title",a))};
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function t(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function u(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,t,C,G,F=function(){if((C=b.offsetWidth)!=p||(G=b.offsetHeight)!=t)m=!0,p=C,t=G;g()},I=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",F);I(f,"scroll",F)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,m=e.length;f<m;f++)t(e[f],c);else t(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(m))};a(m);var q,u,B,E,F=function(){if((B=b.offsetWidth)!=q||(E=b.offsetHeight)!=u)l=!0,q=B,u=E;g()},H=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};H(d,"scroll",F);H(f,"scroll",F)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,g=e.length;c<g;c++)u(e[c],q);else u(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index b5d04e52..921e0173 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2110,7 +2110,7 @@ function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6=
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),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();
Editor=function(a,b,e,d,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,d){var c=null!=d?d.getProperty("edit"):null;null!=c&&c.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(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
"/move.png";Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
@@ -2148,15 +2148,15 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],c=0;c<
-e.length;c++)null!=a.view.getState(e[c])&&k.push(e[c]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],q=0;q<
+e.length;q++)null!=a.view.getState(e[q])&&k.push(e[q]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,k,l,t,c,f,g,m){var p=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(p=80);e+=p;d+=p;var n=e,v=d,q=mxUtils.getDocumentSize();null!=window.innerHeight&&(q.height=window.innerHeight);var x=q.height,y=Math.max(1,Math.round((q.width-e-64)/2)),D=Math.max(1,Math.round((x-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,x-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));q=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=q.x+"px";this.bg.style.top=q.y+"px";y+=q.x;D+=q.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(f?"geTransDialog":
-"geDialog");k=this.getPosition(y,D,e,d);y=k.x;D=k.y;z.style.width=e+"px";z.style.height=d+"px";z.style.left=y+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(b);document.body.appendChild(z);!c&&b.clientHeight>z.clientHeight-64&&(b.style.overflowY="auto");if(l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=D+14+"px",l.style.left=y+e+38-p+"px",l.style.zIndex=
-this.zIndex,mxEvent.addListener(l,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(c){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var f=g();null!=f&&(n=e=f.w,v=d=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";y=Math.max(1,Math.round((f.width-e-64)/2));D=Math.max(1,
-Math.round((x-d-a.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-64):n;d=Math.min(v,x-64);f=this.getPosition(y,D,e,d);y=f.x;D=f.y;z.style.left=y+"px";z.style.top=D+"px";z.style.width=e+"px";z.style.height=d+"px";!c&&b.clientHeight>z.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=y+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=
-z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,k,n,u,q,c,f,g){var l=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(l=80);e+=l;d+=l;var m=e,t=d,p=mxUtils.getDocumentSize();null!=window.innerHeight&&(p.height=window.innerHeight);var x=p.height,C=Math.max(1,Math.round((p.width-e-64)/2)),z=Math.max(1,Math.round((x-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,x-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));p=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=p.x+"px";this.bg.style.top=p.y+"px";C+=p.x;z+=p.y;k&&document.body.appendChild(this.bg);var D=a.createDiv(c?"geTransDialog":
+"geDialog");k=this.getPosition(C,z,e,d);C=k.x;z=k.y;D.style.width=e+"px";D.style.height=d+"px";D.style.left=C+"px";D.style.top=z+"px";D.style.zIndex=this.zIndex;D.appendChild(b);document.body.appendChild(D);!q&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=z+14+"px",n.style.left=C+e+38-l+"px",n.style.zIndex=
+this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=n,!g)){var I=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){I=!0}),null,mxUtils.bind(this,function(c){I&&(a.hideDialog(!0),I=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=f){var c=f();null!=c&&(m=e=c.w,t=d=c.h)}c=mxUtils.getDocumentSize();x=c.height;this.bg.style.height=x+"px";C=Math.max(1,Math.round((c.width-e-64)/2));z=Math.max(1,
+Math.round((x-d-a.footerHeight)/3));e=null!=document.body?Math.min(m,document.body.scrollWidth-64):m;d=Math.min(t,x-64);c=this.getPosition(C,z,e,d);C=c.x;z=c.y;D.style.left=C+"px";D.style.top=z+"px";D.style.width=e+"px";D.style.height=d+"px";!q&&b.clientHeight>D.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=C+e+38-l+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=u;this.container=
+D;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -2165,82 +2165,82 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
"/locked.png";
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,d,k,l,t,c,f,g,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=b){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,b);n.setAttribute("title",b);p.appendChild(n)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;p.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=l&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();l()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",e.appendChild(g));var v=mxUtils.button(d,function(){f&&a.hideDialog();null!=k&&k()});
-v.className="geBtn";e.appendChild(v);null!=t&&(d=mxUtils.button(t,function(){f&&a.hideDialog();null!=c&&c()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var f=c.checked||g.checked,d=parseInt(p.value)/100;isNaN(d)&&(d=1,p.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(f){var v=c.checked?1:parseInt(m.value);isNaN(v)||(n=mxUtils.getScaleForPageCount(v,e,b))}e.getGraphBounds();var l=v=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);n*=d;!f&&e.pageVisible?(d=e.getPageLayout(),v-=d.x*b.width,l-=d.y*b.height):
-f=!0;f=PrintDialog.createPrintPreview(e,n,b,0,v,l,f);f.open();a&&PrintDialog.printPreview(f)}var e=a.editor.graph,d,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var t=document.createElement("tbody");d=document.createElement("tr");var c=document.createElement("input");c.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(c);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
-k.appendChild(f);mxEvent.addListener(f,"click",function(a){c.checked=!c.checked;g.checked=!c.checked;mxEvent.consume(a)});mxEvent.addListener(c,"change",function(){g.checked=!c.checked});d.appendChild(k);t.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");k.appendChild(f);mxEvent.addListener(f,
-"click",function(a){g.checked=!g.checked;c.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);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";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(m);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);t.appendChild(d);mxEvent.addListener(g,"change",
-function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");c.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";k.appendChild(p);d.appendChild(k);t.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&k.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
-k.appendChild(f);d.appendChild(k);t.appendChild(d);l.appendChild(t);this.container=l};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
-PrintDialog.createPrintPreview=function(a,b,e,d,k,l,t){b=new mxPrintPreview(a,b,e,d,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=t;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var c=b.writeHead;b.writeHead=function(a){c.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+var ErrorDialog=function(a,b,e,d,k,n,u,q,c,f,g){c=null!=c?c:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="10px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxUtils.write(m,b);m.setAttribute("title",b);l.appendChild(m)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;l.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();n()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=f&&(f=mxUtils.button(f,function(){null!=g&&g()}),f.className="geBtn",e.appendChild(f));var t=mxUtils.button(d,function(){c&&a.hideDialog();null!=k&&k()});
+t.className="geBtn";e.appendChild(t);null!=u&&(d=mxUtils.button(u,function(){c&&a.hideDialog();null!=q&&q()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){t.focus()};l.appendChild(e);this.container=l},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,d=parseInt(l.value)/100;isNaN(d)&&(d=1,l.value="100%");var d=.75*d,b=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var t=q.checked?1:parseInt(g.value);isNaN(t)||(m=mxUtils.getScaleForPageCount(t,e,b))}e.getGraphBounds();var n=t=0,b=mxRectangle.fromRectangle(b);b.width=Math.ceil(b.width*d);b.height=Math.ceil(b.height*d);m*=d;!c&&e.pageVisible?(d=e.getPageLayout(),t-=d.x*b.width,n-=d.y*b.height):
+c=!0;c=PrintDialog.createPrintPreview(e,m,b,0,t,n,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,k,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var u=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
+k.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(k);u.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");k.appendChild(c);mxEvent.addListener(c,
+"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);u.appendChild(d);mxEvent.addListener(f,"change",
+function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var l=document.createElement("input");l.setAttribute("value","100 %");l.setAttribute("size","5");l.style.width="50px";k.appendChild(l);d.appendChild(k);u.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+k.style.paddingTop="20px";k.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&k.appendChild(c);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";k.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";k.appendChild(m);a.editor.cancelFirst||
+k.appendChild(c);d.appendChild(k);u.appendChild(d);n.appendChild(u);this.container=n};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,d,k,n,u){b=new mxPrintPreview(a,b,e,d,k,n);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=u;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function e(){null==v?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(n.setAttribute("title",v.src),n.style.fontSize="11px",n.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
-l,t=document.createElement("table");t.style.width="100%";t.style.height="100%";var c=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");
-l=document.createElement("td");mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var m=d.background;b();mxEvent.addListener(g,"click",function(c){a.pickColor(m||"none",function(a){m=
-a;b()});mxEvent.consume(c)});l.appendChild(g);mxUtils.write(l,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();l.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,
-mxResources.get("image")+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a,c){c||(v=a,e())},v);mxEvent.consume(c)});e();l.appendChild(n);k.appendChild(l);c.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align",
-"right");var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&l.appendChild(q);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=parseInt(p.value);isNaN(c)||d.gridSize===c||d.setGridSize(c);c=new ChangePageSetup(a,m,v,f.get());c.ignoreColor=d.background==m;c.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==c.previousFormat.width&&d.pageFormat.height==
-c.previousFormat.height&&c.ignoreColor&&c.ignoreImage||d.model.execute(c)});x.className="geBtn gePrimaryBtn";l.appendChild(x);a.editor.cancelFirst||l.appendChild(q);k.appendChild(l);c.appendChild(k);t.appendChild(c);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,d,b){if(b||p!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<q.length;d++)b=q[d],z?"custom"==b.key&&(c.value=b.key,z=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(c.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(c.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,a=t.checked=!0));a?(f.style.display="",m.style.display="none"):(p.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
-c.value="custom",f.style.display="none",m.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",b);t.setAttribute("type","radio");t.setAttribute("value","landscape");var c=document.createElement("select");c.style.marginBottom="8px";c.style.width="202px";var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";
-f.style.height="24px";l.style.marginRight="6px";f.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));f.appendChild(b);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");
-p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},q=PageSetupDialog.getFormats(),x=0;x<q.length;x++){var y=q[x];v[y.key]=y;var D=document.createElement("option");D.setAttribute("value",y.key);mxUtils.write(D,y.title);c.appendChild(D)}var z=!1;k();a.appendChild(c);mxUtils.br(a);
-a.appendChild(f);a.appendChild(m);var E=e,A=function(a,b){var g=v[c.value];null!=g.format?(p.value=g.format.width/100,n.value=g.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");g=parseFloat(p.value);if(isNaN(g)||0>=g)p.value=e.width/100;g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=e.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(n.value)));"custom"!=c.value&&t.checked&&(g=new mxRectangle(0,0,
-g.height,g.width));b&&z||g.width==E.width&&g.height==E.height||(E=g,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){l.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){t.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(p,"blur",A);mxEvent.addListener(p,"click",A);mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(t,"change",A);mxEvent.addListener(l,"change",A);mxEvent.addListener(c,"change",function(a){z="custom"==c.value;
-A(a,!0)});A();return{set:function(a){e=a;k(null,null,!0)},get:function(){return E},widthInput:p,heightInput:n}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=g,f.style.backgroundImage="")}function e(){null==t?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(m.setAttribute("title",t.src),m.style.fontSize="11px",m.innerHTML=mxUtils.htmlEntities(t.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+n,u=document.createElement("table");u.style.width="100%";u.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(g||"none",function(a){g=
+a;b()});mxEvent.consume(c)});n.appendChild(f);mxUtils.write(n,mxResources.get("gridSize")+":");var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.style.width="40px";l.style.marginLeft="6px";l.value=d.getGridSize();n.appendChild(l);mxEvent.addListener(l,"change",function(){var a=parseInt(l.value);l.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");mxUtils.write(n,
+mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var t=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,e())},t);mxEvent.consume(c)});e();n.appendChild(m);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align",
+"right");var p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&n.appendChild(p);var x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var f=parseInt(l.value);isNaN(f)||d.gridSize===f||d.setGridSize(f);f=new ChangePageSetup(a,g,t,c.get());f.ignoreColor=d.background==g;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=t?t.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==
+f.previousFormat.height&&f.ignoreColor&&f.ignoreImage||d.model.execute(f)});x.className="geBtn gePrimaryBtn";n.appendChild(x);a.editor.cancelFirst||n.appendChild(p);k.appendChild(n);q.appendChild(k);u.appendChild(q);this.container=u};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,f,d){if(d||l!=document.activeElement&&m!=document.activeElement){a=!1;for(f=0;f<p.length;f++)d=p[f],D?"custom"==d.key&&(q.value=d.key,D=!1):null!=d.format&&("a4"==d.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==d.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==d.format.width&&
+e.height==d.format.height?(q.value=d.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(q.value=d.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,u.setAttribute("checked","checked"),u.defaultChecked=!0,a=u.checked=!0));a?(c.style.display="",g.style.display="none"):(l.value=e.width/100,m.value=e.height/100,n.setAttribute("checked","checked"),
+q.value="custom",c.style.display="none",g.style.display="")}}b="format-"+b;var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","portrait");var u=document.createElement("input");u.setAttribute("name",b);u.setAttribute("type","radio");u.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";
+c.style.height="24px";n.style.marginRight="6px";c.appendChild(n);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);u.style.marginLeft="10px";u.style.marginRight="6px";c.appendChild(u);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var l=document.createElement("input");
+l.setAttribute("size","7");l.style.textAlign="right";g.appendChild(l);mxUtils.write(g," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";g.appendChild(m);mxUtils.write(g," in");c.style.display="none";g.style.display="none";for(var t={},p=PageSetupDialog.getFormats(),x=0;x<p.length;x++){var C=p[x];t[C.key]=C;var z=document.createElement("option");z.setAttribute("value",C.key);mxUtils.write(z,C.title);q.appendChild(z)}var D=!1;k();a.appendChild(q);mxUtils.br(a);
+a.appendChild(c);a.appendChild(g);var I=e,y=function(a,f){var b=t[q.value];null!=b.format?(l.value=b.format.width/100,m.value=b.format.height/100,g.style.display="none",c.style.display=""):(c.style.display="none",g.style.display="");b=parseFloat(l.value);if(isNaN(b)||0>=b)l.value=e.width/100;b=parseFloat(m.value);if(isNaN(b)||0>=b)m.value=e.height/100;b=new mxRectangle(0,0,Math.floor(100*parseFloat(l.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&u.checked&&(b=new mxRectangle(0,0,
+b.height,b.width));f&&D||b.width==I.width&&b.height==I.height||(I=b,null!=d&&d(I))};mxEvent.addListener(b,"click",function(a){n.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){u.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(l,"blur",y);mxEvent.addListener(l,"click",y);mxEvent.addListener(m,"blur",y);mxEvent.addListener(m,"click",y);mxEvent.addListener(u,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(q,"change",function(a){D="custom"==q.value;
+y(a,!0)});y();return{set:function(a){e=a;k(null,null,!0)},get:function(){return I},widthInput:l,heightInput:m}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
-{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,d,k,l,t,c,f,g,m,p){f=null!=f?f:!0;var n,v,q=document.createElement("table"),x=document.createElement("tbody");q.style.marginTop="8px";n=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=m?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");n.appendChild(v);var y=document.createElement("input");y.setAttribute("value",b||"");y.style.marginLeft="4px";y.style.width=null!=p?p+
-"px":"180px";var D=mxUtils.button(e,function(){if(null==l||l(y.value))f&&a.hideDialog(),d(y.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==t)if(y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=q.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=y,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(y.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
-v.style.whiteSpace="nowrap";v.appendChild(y);n.appendChild(v);if(null!=k||null==t)x.appendChild(n),null!=m&&(null!=a.editor.diagramFileTypes&&(n=FilenameDialog.createFileTypes(a,y,a.editor.diagramFileTypes),n.style.marginLeft="6px",n.style.width="74px",v.appendChild(n),y.style.width=null!=p?p-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,y,m)));null!=t&&(n=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),n.appendChild(v),x.appendChild(n));n=
-document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});m.className="geBtn";a.editor.cancelFirst&&v.appendChild(m);null!=c&&(p=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(c)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(y,"keypress",function(a){13==a.keyCode&&D.click()});
-v.appendChild(D);a.editor.cancelFirst||v.appendChild(m);n.appendChild(v);x.appendChild(n);q.appendChild(x);this.container=q};FilenameDialog.filenameHelpLink=null;
+{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
+var FilenameDialog=function(a,b,e,d,k,n,u,q,c,f,g,l){c=null!=c?c:!0;var m,t,p=document.createElement("table"),x=document.createElement("tbody");p.style.marginTop="8px";m=document.createElement("tr");t=document.createElement("td");t.style.whiteSpace="nowrap";t.style.fontSize="10pt";t.style.width=g?"80px":"120px";mxUtils.write(t,(k||mxResources.get("filename"))+":");m.appendChild(t);var C=document.createElement("input");C.setAttribute("value",b||"");C.style.marginLeft="4px";C.style.width=null!=l?l+
+"px":"180px";var z=mxUtils.button(e,function(){if(null==n||n(C.value))c&&a.hideDialog(),d(C.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==u)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=C,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),z.click());a.stopPropagation();a.preventDefault()}))}}};t=document.createElement("td");
+t.style.whiteSpace="nowrap";t.appendChild(C);m.appendChild(t);if(null!=k||null==u)x.appendChild(m),null!=g&&(null!=a.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(a,C,a.editor.diagramFileTypes),m.style.marginLeft="6px",m.style.width="74px",t.appendChild(m),C.style.width=null!=l?l-40+"px":"140px"),t.appendChild(FilenameDialog.createTypeHint(a,C,g)));null!=u&&(m=document.createElement("tr"),t=document.createElement("td"),t.colSpan=2,t.appendChild(u),m.appendChild(t),x.appendChild(m));m=
+document.createElement("tr");t=document.createElement("td");t.colSpan=2;t.style.paddingTop="20px";t.style.whiteSpace="nowrap";t.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});g.className="geBtn";a.editor.cancelFirst&&t.appendChild(g);null!=q&&(l=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(q)}),l.className="geBtn",t.appendChild(l));mxEvent.addListener(C,"keypress",function(a){13==a.keyCode&&z.click()});
+t.appendChild(z);a.editor.cancelFirst||t.appendChild(g);m.appendChild(t);x.appendChild(m);p.appendChild(x);this.container=p};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,b,e){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",k);mxEvent.addListener(b,"change",k);mxEvent.addListener(d,"click",function(b){var e=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(b)});k();return d};
FilenameDialog.createFileTypes=function(a,b,e){var d=document.createElement("select");for(a=0;a<e.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(e[a].description)+" (."+e[a].extension+")");d.appendChild(k)}mxEvent.addListener(d,"change",function(a){a=e[d.value].extension;var k=b.value.lastIndexOf(".");0<k?(a=e[d.value].extension,b.value=b.value.substring(0,k+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),c=0;c<e.length;c++)if(k==e[c].extension){a=c;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=a.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
-mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),f.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
-mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,f=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",d="none",b="";if(a.isGridEnabled()){b=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(f))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",b=a.gridSize*this.scale*this.gridSteps):
-d="url("+this.gridImage+")";var e=f=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),f=1+e.x,e=1+e.y);b=-Math.round(b-mxUtils.mod(this.translate.x*this.scale-f,b))+"px "+-Math.round(b-mxUtils.mod(this.translate.y*this.scale-e,b))+"px"}f=a.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=b,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
-c,a.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(a.container.className="geDiagramContainer",f.style.backgroundPosition=b,f.style.backgroundColor=c,f.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var f=this.gridSteps*c,d=[],b=1;b<this.gridSteps;b++){var e=b*c;d.push("M 0 "+e+" L "+f+" "+e+" M "+e+" 0 L "+e+" "+f)}return'<svg width="'+
-f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=
-this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var b=this.gridSize*this.view.scale*this.view.gridSteps,b=-Math.round(b-mxUtils.mod(this.view.translate.x*this.view.scale+d,b))+"px "+-Math.round(b-mxUtils.mod(this.view.translate.y*this.view.scale+c,b))+"px";f.style.backgroundPosition=b}};mxGraph.prototype.updatePageBreaks=function(a,c,f){var d=this.view.scale,b=this.view.translate,e=this.pageFormat,n=d*this.pageScale,v=this.view.getBackgroundPageBounds();c=v.width;f=v.height;var q=
-new mxRectangle(d*b.x,d*b.y,e.width*n,e.height*n),k=(a=a&&Math.min(q.width,q.height)>this.minPageBreakDist)?Math.ceil(f/q.height)-1:0,l=a?Math.ceil(c/q.width)-1:0,t=v.x+c,z=v.y+f;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<l&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?k:l,f=0;f<=c;f++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(v.x),Math.round(v.y+(f+1)*q.height)),
-new mxPoint(Math.round(t),Math.round(v.y+(f+1)*q.height))]:[new mxPoint(Math.round(v.x+(f+1)*q.width),Math.round(v.y)),new mxPoint(Math.round(v.x+(f+1)*q.width),Math.round(z))];null!=a[f]?(a[f].points=d,a[f].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[f]=d)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){for(var d=0;d<c.length;d++){if(this.graph.isTableCell(c[d])||this.graph.isTableRow(c[d]))return!1;if(this.graph.getModel().isVertex(c[d])){var e=this.graph.getCellGeometry(c[d]);if(null!=e&&e.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);
-a.intersects=mxUtils.bind(this,function(c,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,f=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,b=this.graph.pageScale,
-e=d.width*b,d=d.height*b,b=Math.floor(Math.min(0,c)/e),n=Math.floor(Math.min(0,f)/d);return new mxRectangle(this.scale*(this.translate.x+b*e),this.scale*(this.translate.y+n*d),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-b)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/d)-n)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
-mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,d,b,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,c,f){var d,b=this.graph.model.getParent(a);
-if(c)d=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(b)&&!this.graph.isSiblingSelected(a)&&(null!=d&&d.relative||!this.graph.isContainer(b)||this.graph.isPart(a));else if(d=l.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=b,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(f.getEvent())||this.graph.isCellSelected(a)&&
-!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(b);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),f=c.getParent(a),d=this.graph.view.getState(f),b=this.graph.isCellSelected(a);null!=d&&(c.isVertex(f)||c.isEdge(f));){var e=this.graph.isCellSelected(f),b=b||e;if(e||!b&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=f;f=c.getParent(f)}return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
+a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),n=0;n<e.length;n++)if(k==e[n].extension){a=n;break}d.value=a};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
+mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
+mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,d=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",f="none",b="";if(a.isGridEnabled()){b=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",b=a.gridSize*this.scale*this.gridSteps):
+f="url("+this.gridImage+")";var e=c=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),c=1+e.x,e=1+e.y);b=-Math.round(b-mxUtils.mod(this.translate.x*this.scale-c,b))+"px "+-Math.round(b-mxUtils.mod(this.translate.y*this.scale-e,b))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=b,a.view.backgroundPageShape.node.style.backgroundImage=f,a.view.backgroundPageShape.node.style.backgroundColor=
+d,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=b,c.style.backgroundColor=d,c.style.backgroundImage=f)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var c=this.gridSteps*d,f=[],b=1;b<this.gridSteps;b++){var e=b*d;f.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+
+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+f.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var c=
+this.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+d,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";c.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,d,c){var f=this.view.scale,b=this.view.translate,e=this.pageFormat,m=f*this.pageScale,t=this.view.getBackgroundPageBounds();d=t.width;c=t.height;var p=
+new mxRectangle(f*b.x,f*b.y,e.width*m,e.height*m),x=(a=a&&Math.min(p.width,p.height)>this.minPageBreakDist)?Math.ceil(c/p.height)-1:0,k=a?Math.ceil(d/p.width)-1:0,n=t.x+d,q=t.y+c;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:k,d=0;d<=c;d++){var f=a==this.horizontalPageBreaks?[new mxPoint(Math.round(t.x),Math.round(t.y+(d+1)*p.height)),
+new mxPoint(Math.round(n),Math.round(t.y+(d+1)*p.height))]:[new mxPoint(Math.round(t.x+(d+1)*p.width),Math.round(t.y)),new mxPoint(Math.round(t.x+(d+1)*p.width),Math.round(q))];null!=a[d]?(a[d].points=f,a[d].redraw()):(f=new mxPolyline(f,this.pageBreakColor),f.dialect=this.dialect,f.isDashed=this.pageBreakDashed,f.pointerEvents=!1,f.init(this.view.backgroundPane),f.redraw(),a[d]=f)}for(d=c;d<a.length;d++)a[d].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,c){for(var f=0;f<d.length;f++){if(this.graph.isTableCell(d[f])||this.graph.isTableRow(d[f]))return!1;if(this.graph.getModel().isVertex(d[f])){var g=this.graph.getCellGeometry(d[f]);if(null!=g&&g.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);
+a.intersects=mxUtils.bind(this,function(d,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),d=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,f=this.graph.pageFormat,b=this.graph.pageScale,
+e=f.width*b,f=f.height*b,b=Math.floor(Math.min(0,d)/e),m=Math.floor(Math.min(0,c)/f);return new mxRectangle(this.scale*(this.translate.x+b*e),this.scale*(this.translate.y+m*f),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/e)-b)*e,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/f)-m)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
+mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,d,c,f,b,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,d,c){var f,b=this.graph.model.getParent(a);
+if(d)f=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),f=!this.graph.model.isEdge(b)&&!this.graph.isSiblingSelected(a)&&(null!=f&&f.relative||!this.graph.isContainer(b)||this.graph.isPart(a));else if(f=n.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))f=b,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(c.getEvent())||this.graph.isCellSelected(a)&&
+!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(b);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),c=d.getParent(a),f=this.graph.view.getState(c),b=this.graph.isCellSelected(a);null!=f&&(d.isVertex(c)||d.isEdge(c));){var e=this.graph.isCellSelected(c),b=b||e;if(e||!b&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=d.getParent(c)}return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=
k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var l=d.graphHandler.start;d.graphHandler.start=function(){null!=y.hoverIcons&&y.hoverIcons.reset();l.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var t=!1,c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,f){return t||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(t=!0,this.hoverIcons.reset(),
-d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";t=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return f.apply(this,arguments)||t||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var m=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return t||m.apply(this,arguments)};var p=!1,n=null,v=null,q=null,x=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&p!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var b=0;b<q.length;b++)this.toolbar.container.appendChild(q[b]);this.toolbar.fontMenu=n;this.toolbar.sizeMenu=v}p=d.cellEditor.isContentEditing();
-n=a;v=f;q=c}}),y=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);x();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=y.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));y.toolbar.setFontName(f);
-y.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{z.apply(this,arguments),x()}catch(B){y.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
-window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var E=d.fireMouseEvent;d.fireMouseEvent=function(a,c,f){a==mxEvent.MOUSE_DOWN&&this.container.focus();E.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,f){this.menus.createPopupMenu(a,c,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
-function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),C="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=
-d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var p=m[e],u=p.indexOf("=");if(0<=u){g=p.substring(0,u);var n=p.substring(u+1);null!=b[g]&&"none"==n&&(a.push(n),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
-f,"values",a,"cells",[c.cell]))}}catch(W){this.handleError(W)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
-["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(b=0;b<I[a].length;b++)A.push(I[a][b]);for(a=0;a<C.length;a++)0>mxUtils.indexOf(A,C[a])&&A.push(C[a]);var K=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),p=null!=m?m.split(";"):[];e=A.slice();for(var u=0;u<p.length;u++){var n=p[u],B=n.indexOf("=");if(0<=B){var q=
-n.substring(0,B),v=mxUtils.indexOf(e,q);0<=v&&e.splice(v,1);for(var k=0;k<I.length;k++){var l=I[k];if(0<=mxUtils.indexOf(l,q))for(var x=0;x<l.length;x++){var J=mxUtils.indexOf(e,l[x]);0<=J&&e.splice(J,1)}}}}}for(var y=f.isEdge(g),t=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),u=0;u<e.length;u++){var q=e[u],z=t[q];null==z||"shape"==q&&!y||y&&!(0>mxUtils.indexOf(C,q))||(D=mxUtils.setStyle(D,q,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
-d.addListener("textInserted",function(a,c){K(c.getProperty("cells"),!0)});this.insertHandler=K;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));K(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
-c.getProperty("keys"),m=c.getProperty("values"),e=0;e<f.length;e++){var p=0<=mxUtils.indexOf(G,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(C,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||p)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
-m[e];if(g||p||0<=mxUtils.indexOf(F,f[e]))null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var n=d.graphHandler.start;d.graphHandler.start=function(){null!=C.hoverIcons&&C.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return u||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),
+d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var c=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return c.apply(this,arguments)||u||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var f=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return f.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var g=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return u||g.apply(this,arguments)};var l=!1,m=null,t=null,p=null,x=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var f=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=f}a=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var b=0;b<p.length;b++)this.toolbar.container.appendChild(p[b]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=t}l=d.cellEditor.isContentEditing();
+m=a;t=f;p=c}}),C=this,z=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){z.apply(this,arguments);x();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=C.toolbar)){var f=c.fontFamily;"'"==f.charAt(0)&&(f=f.substring(1));"'"==f.charAt(f.length-1)&&(f=f.substring(0,f.length-1));C.toolbar.setFontName(f);
+C.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var D=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{D.apply(this,arguments),x()}catch(A){C.handleError(A)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(v){}var I=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();I.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
+function(){return keyHandler};var y="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),B="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=
+d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),m=null!=e?e.split(";"):[],e=0;e<m.length;e++){var l=m[e],v=l.indexOf("=");if(0<=v){g=l.substring(0,v);var p=l.substring(v+1);null!=b[g]&&"none"==p&&(a.push(p),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
+f,"values",a,"cells",[c.cell]))}}catch(da){this.handleError(da)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),H=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
+["strokeColor","strokeWidth"],["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)y.push(H[a][b]);for(a=0;a<B.length;a++)0>mxUtils.indexOf(y,B[a])&&y.push(B[a]);var G=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var m=f.getStyle(g),l=null!=m?m.split(";"):[];e=y.slice();for(var v=0;v<l.length;v++){var A=l[v],p=A.indexOf("=");if(0<=p){var t=
+A.substring(0,p),x=mxUtils.indexOf(e,t);0<=x&&e.splice(x,1);for(var k=0;k<H.length;k++){var n=H[k];if(0<=mxUtils.indexOf(n,t))for(var K=0;K<n.length;K++){var z=mxUtils.indexOf(e,n[K]);0<=z&&e.splice(z,1)}}}}}for(var q=f.isEdge(g),C=q?d.currentEdgeStyle:d.currentVertexStyle,u=f.getStyle(g),v=0;v<e.length;v++){var t=e[v],D=C[t];null==D||"shape"==t&&!q||q&&!(0>mxUtils.indexOf(B,t))||(u=mxUtils.setStyle(u,t,D))}f.setStyle(g,u)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){G(c.getProperty("cells"))});
+d.addListener("textInserted",function(a,c){G(c.getProperty("cells"),!0)});this.insertHandler=G;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));G(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
+c.getProperty("keys"),m=c.getProperty("values"),e=0;e<f.length;e++){var l=0<=mxUtils.indexOf(E,f[e]);if("strokeColor"!=f[e]||null!=m[e]&&"none"!=m[e])if(0<=mxUtils.indexOf(B,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]:b&&0<=mxUtils.indexOf(y,f[e])&&(null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=m[e]);else if(0<=mxUtils.indexOf(y,f[e])){if(b||l)null==m[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
+m[e];if(g||l||0<=mxUtils.indexOf(F,f[e]))null==m[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=m[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,
d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||
@@ -2252,16 +2252,16 @@ EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;Edi
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){"mouseDown"==c.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var e=
-a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var d=a.dblClick;a.dblClick=function(a,c){if(this.isEnabled())if(null!=c||null==b.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));b.showShapePicker(f.x,f.y)}};if(null!=this.hoverIcons){var k=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();
-k.apply(this,arguments)};var l=this.hoverIcons.execute;this.hoverIcons.execute=function(d,c,f){var g=f.getEvent();mxEvent.isControlDown(g)||mxEvent.isShiftDown(g)?l.apply(this,arguments):this.graph.connectVertex(d.cell,c,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(g,e,n){g=a.getCompositeParent(d.cell);e=a.getCellGeometry(g);for(f.consume();null!=g&&a.model.isVertex(g)&&null!=e&&e.relative;)cell=g,g=a.model.getParent(cell),e=a.getCellGeometry(g);b.showShapePicker(f.getGraphX(),
-f.getGraphY(),g,mxUtils.bind(this,function(a){n(a)}),c)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
-EditorUi.prototype.showShapePicker=function(a,b,e,d,k){var l=this.getCellsForShapePicker(e);if(null!=l&&0<l.length){var t=this,c=this.editor.graph,f=document.createElement("div"),g=c.view.getState(e),m=null==e||null!=g&&c.isTransparentState(g)?null:c.copyStyle(e);f.className="geToolbarContainer geSidebarContainer geSidebar";f.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";
-k==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-100%)"):k==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)"):k==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(f.style,"transform","translate(-100%,-50%)"):k==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(f.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(f.style,"transform","translate(-4px,-4px)");null!=c.background&&c.background!=mxConstants.NONE&&
-(f.style.backgroundColor=c.background);c.container.appendChild(f);e=mxUtils.bind(this,function(g){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m?this.sidebar.graph.pasteStyle(m,[g]):t.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,e,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(e,"click",function(){var f=c.cloneCell(g);if(null!=d)d(f);else{f.geometry.x=c.snap(Math.round(a/c.view.scale)-c.view.translate.x-g.geometry.width/2);f.geometry.y=c.snap(Math.round(b/c.view.scale)-c.view.translate.y-g.geometry.height/2);c.model.beginUpdate();try{c.addCell(f)}finally{c.model.endUpdate()}c.setSelectionCell(f);c.scrollCellToVisible(f);c.startEditingAtCell(f);null!=t.hoverIcons&&t.hoverIcons.update(c.view.getState(f))}t.hideShapePicker()})});for(k=0;k<l.length;k++)e(l[k]);
-null!=t.hoverIcons&&t.hoverIcons.reset();c.popupMenuHandler.hideMenu();c.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=f}};
-EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,d,b,l){return this.editor.graph.createVertex(null,null,l||"",0,0,d||120,b||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;",120,80),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){"mouseDown"==d.getProperty("eventName")&&b.hideShapePicker()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){b.hideShapePicker(!0)}));var e=
+a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var d=a.dblClick;a.dblClick=function(a,e){if(this.isEnabled())if(null!=e||null==b.sidebar||mxEvent.isShiftDown(a))d.apply(this,arguments);else{mxEvent.consume(a);var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(c.x,c.y)}),30)}};if(null!=this.hoverIcons){var k=this.hoverIcons.drag;
+this.hoverIcons.drag=function(){b.hideShapePicker();k.apply(this,arguments)};var n=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,c){var f=c.getEvent();mxEvent.isControlDown(f)||mxEvent.isShiftDown(f)?n.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){f=a.getCompositeParent(d.cell);l=a.getCellGeometry(f);for(c.consume();null!=f&&a.model.isVertex(f)&&null!=l&&l.relative;)cell=f,f=a.model.getParent(cell),
+l=a.getCellGeometry(f);b.showShapePicker(c.getGraphX(),c.getGraphY(),f,mxUtils.bind(this,function(a){m(a)}),e)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,f,this)}))}}};
+EditorUi.prototype.showShapePicker=function(a,b,e,d,k){var n=this.getCellsForShapePicker(e);if(null!=n&&0<n.length){var u=this,q=this.editor.graph,c=document.createElement("div"),f=q.view.getState(e),g=null==e||null!=f&&q.isTransparentState(f)?null:q.copyStyle(e);c.className="geToolbarContainer geSidebarContainer geSidebar";c.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";
+k==mxConstants.DIRECTION_NORTH?mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,-100%)"):k==mxConstants.DIRECTION_SOUTH?mxUtils.setPrefixedStyle(c.style,"transform","translate(-50%,0%)"):k==mxConstants.DIRECTION_WEST?mxUtils.setPrefixedStyle(c.style,"transform","translate(-100%,-50%)"):k==mxConstants.DIRECTION_EAST?mxUtils.setPrefixedStyle(c.style,"transform","translate(0%,-50%)"):mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=
+mxConstants.NONE&&(c.style.backgroundColor=q.background);q.container.appendChild(c);e=mxUtils.bind(this,function(f){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";c.appendChild(e);null!=g?this.sidebar.graph.pasteStyle(g,[f]):u.insertHandler([f],""!=f.value,this.sidebar.graph.model);this.sidebar.createThumb([f],25,25,e,null,!0,!1,f.geometry.width,
+f.geometry.height);mxEvent.addListener(e,"click",function(){var c=q.cloneCell(f);if(null!=d)d(c);else{c.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-f.geometry.width/2);c.geometry.y=q.snap(Math.round(b/q.view.scale)-q.view.translate.y-f.geometry.height/2);q.model.beginUpdate();try{q.addCell(c)}finally{q.model.endUpdate()}q.setSelectionCell(c);q.scrollCellToVisible(c);q.startEditingAtCell(c);null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(c))}u.hideShapePicker()})});for(k=
+0;k<n.length;k++)e(n[k]);null!=u.hoverIcons&&u.hoverIcons.reset();q.popupMenuHandler.hideMenu();q.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=c}};
+EditorUi.prototype.getCellsForShapePicker=function(a){var b=mxUtils.bind(this,function(a,d,b,n){return this.editor.graph.createVertex(null,null,n||"",0,0,d||120,b||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;",120,80),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),b("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
80,100),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),b("shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;",60,80)]};
EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9!=a.which||!b.isEnabled()||mxEvent.isAltDown(a)||b.isEditing()&&mxEvent.isShiftDown(a)||(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
@@ -2272,41 +2272,41 @@ EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?n
e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==
e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),c={},f=d.createCellLookup(b),g=d.cloneCells(b,null,c),e=new mxGraphModel,p=e.getChildAt(e.getRoot(),
-0),n=0;n<g.length;n++){e.add(p,g[n]);var v=d.view.getState(b[n]);if(null!=v){var q=d.getCellGeometry(g[n]);null!=q&&q.relative&&!e.isEdge(b[n])&&null==f[mxObjectIdentity.get(e.getParent(b[n]))]&&(q.offset=null,q.relative=!1,q.x=v.x/v.view.scale-v.view.translate.x,q.y=v.y/v.view.scale-v.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(c,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var b=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var b=b||d.getSelectionCells(),b=d.getExportableCells(d.model.getTopmostCells(b)),e={},c=d.createCellLookup(b),f=d.cloneCells(b,null,e),g=new mxGraphModel,l=g.getChildAt(g.getRoot(),
+0),m=0;m<f.length;m++){g.add(l,f[m]);var t=d.view.getState(b[m]);if(null!=t){var p=d.getCellGeometry(f[m]);null!=p&&p.relative&&!g.isEdge(b[m])&&null==c[mxObjectIdentity.get(g.getParent(b[m]))]&&(p.offset=null,p.relative=!1,p.x=t.x/t.view.scale-t.view.translate.x,p.y=t.y/t.view.scale-t.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(e,c),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return b};var e=mxClipboard.paste;mxClipboard.paste=function(d){var b=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.apply(this,arguments);a.updatePasteActionStates();return b};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,b){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),m=a.view.translate,p=a.view.scale,n=mxRectangle.fromRectangle(g);
-n.x=n.x/p-m.x;n.y=n.y/p-m.y;n.width/=p;n.height/=p;var m=a.container.scrollTop,u=a.container.scrollLeft,B=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)B+=3;var q=a.container.offsetWidth-B,B=a.container.offsetHeight-B;c=c?Math.max(.3,Math.min(f||1,q/n.width)):p;f=(q-c*n.width)/2/c;var v=0==this.lightboxVerticalDivider?0:(B-c*n.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),v=Math.max(v,0));if(e||g.width<q||g.height<B)a.view.scaleAndTranslate(c,
-Math.floor(f-n.x),Math.floor(v-n.y)),a.container.scrollTop=m*c/p,a.container.scrollLeft=u*c/p;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/p),Math.floor(g.y+b/p))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
+this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),m=a.view.translate,l=a.view.scale,v=mxRectangle.fromRectangle(e);
+v.x=v.x/l-m.x;v.y=v.y/l-m.y;v.width/=l;v.height/=l;var m=a.container.scrollTop,p=a.container.scrollLeft,A=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)A+=3;var t=a.container.offsetWidth-A,A=a.container.offsetHeight-A;c=c?Math.max(.3,Math.min(f||1,t/v.width)):l;f=(t-c*v.width)/2/c;var x=0==this.lightboxVerticalDivider?0:(A-c*v.height)/this.lightboxVerticalDivider/c;g&&(f=Math.max(f,0),x=Math.max(x,0));if(g||e.width<t||e.height<A)a.view.scaleAndTranslate(c,
+Math.floor(f-v.x),Math.floor(x-v.y)),a.container.scrollTop=m*c/l,a.container.scrollLeft=p*c/l;else if(0!=d||0!=b)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+d/l),Math.floor(e.y+b/l))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var l=mxUtils.bind(this,function(){var c=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",l);l();var t=0,l=mxUtils.bind(this,function(a,c,f){t++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title",
-f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&l(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var c=l(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
-f=document.createElement("div");f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=l(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,
-mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",
-m)}l(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");l(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var n=null,v=null,q=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),n=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display=
-"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=l(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
+this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var c=
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var u=0,n=mxUtils.bind(this,function(a,c,f){u++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=f&&d.setAttribute("title",
+f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=k.backBtn&&n(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var q=n(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),
+c=document.createElement("div");c.style.display="inline-block";c.style.verticalAlign="top";c.style.fontFamily="Helvetica,Arial";c.style.marginTop="8px";c.style.fontSize="14px";c.style.color="#ffffff";this.chromelessToolbar.appendChild(c);var f=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(c.innerHTML="",mxUtils.write(c,
+mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",q.style.display="",c.style.display="inline-block"):(f.style.display="none",q.style.display="none",c.style.display="none");g()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",
+g)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
+mxResources.get("fit"));var m=null,t=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),m=null);null!=t&&(window.clearTimeout(t),t=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),m=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display=
+"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(l);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||l(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
-a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var z=this.lightboxToolbarActions[p];l(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&l(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
-window.self!==window.top&&l(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&l(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
-mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),q())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?q():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?q():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
-f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,u=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
-"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform="",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,m=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=u&&(g+=c.x-u.x,m+=c.y-u.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",
-J);a.cumulativeZoomFactor=1;J=K=u=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
-20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));
-u=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
-(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
-"0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d,b,g){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),g=40/a.view.scale,mxEvent.isShiftDown(c)?
-a.view.setTranslate(b.x+(f?-g:g),b.y):a.view.setTranslate(b.x,b.y+(f?g:-g));else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=null!=b&&null!=g?new mxPoint(b,g):new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
+this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){C.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
+a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(l=0;l<this.lightboxToolbarActions.length;l++){var D=this.lightboxToolbarActions[l];n(D.fn,D.icon,D.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
+window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
+mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var I=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<I&&Math.abs(this.scrollTop-a.container.scrollTop)<I&&Math.abs(this.startX-f.getGraphX())<I&&Math.abs(this.startY-f.getGraphY())<I&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?p():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=
+a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}y.apply(this,arguments)};if(!a.isViewer()){var B=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
+f.x+c.width*d.width),e=Math.ceil(2*f.y+c.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=b||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,b,e);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?B.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
+d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var E=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var H=null,G=null,v=null,K=null,A=function(c){null!=H&&window.clearTimeout(H);window.setTimeout(function(){a.isMouseDown||(H=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
+"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",E.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",E.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";E.style.transform=""},0)):(F.style.transform="",E.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
+f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,m=0;null!=G&&(g=a.container.offsetWidth/2-G.x+f.x,m=a.container.offsetHeight/2-G.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,m+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),m*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==m||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=m*(a.cumulativeZoomFactor-1)));null!=K&&F.setAttribute("filter",
+K);a.cumulativeZoomFactor=1;K=G=v=H=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(G=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
+20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==K&&""!=F.getAttribute("filter")&&(K=F.getAttribute("filter"),F.removeAttribute("filter"));
+v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:G.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:G.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";E.style.transformOrigin=c+"px "+b+"px";E.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
+(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":G.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":G.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
+"0";null!=e.hoverIcons&&e.hoverIcons.reset()}A(d)};mxEvent.addGestureListeners(a.container,function(a){null!=H&&window.clearTimeout(H)},null,function(c){1!=a.cumulativeZoomFactor&&A(0)});mxEvent.addListener(a.container,"scroll",function(){H&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&A(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d,b,e){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c))b=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(c)?
+a.view.setTranslate(b.x+(f?-e:e),b.y):a.view.setTranslate(b.x,b.y+(f?e:-e));else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),G=null!=b&&null!=e?new mxPoint(b,e):new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
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")))};
@@ -2329,21 +2329,21 @@ this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.e
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,c){l.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=!1,l=a.getSelectionCells();if(null!=l)for(var t=0;t<l.length;t++){var c=l[t];a.getModel().isEdge(c)&&(k=!0);a.getModel().isVertex(c)&&(e=!0,0<a.getModel().getChildCount(c)||a.isContainer(c))&&(d=!0);if(k&&e)break}l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(t=
-0;t<l.length;t++)this.actions.get(l[t]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);k=e&&1==
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);d()};var n=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){n.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,k=!1,n=a.getSelectionCells();if(null!=n)for(var u=0;u<n.length;u++){var q=n[u];a.getModel().isEdge(q)&&(k=!0);a.getModel().isVertex(q)&&(e=!0,0<a.getModel().getChildCount(q)||a.isContainer(q))&&(d=!0);if(k&&e)break}n="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(u=
+0;u<n.length;u++)this.actions.get(n[u]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);k=e&&1==
a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||k&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(k&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));
this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&
null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);
this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),t=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",t+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",t+=this.toolbarHeight);0<t&&!mxClient.IS_QUIRKS&&(t+=1);var c=0;if(null!=this.sidebarFooterContainer){var f=
-this.footerHeight+k,c=Math.max(0,Math.min(d-t-f,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=c+"px";this.sidebarFooterContainer.style.bottom=f+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=t+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=t+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";var g=this.getDiagramContainerOffset(),
-m=null!=this.hsplit.parentNode?l+this.splitSize:0;this.diagramContainer.style.left=m+g.x+"px";this.diagramContainer.style.top=t+g.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=m+"px");b?(this.menubarContainer.style.width=e+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-c+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-f)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,c=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",c-=this.tabContainer.clientHeight),this.diagramContainer.style.height=c+"px",this.hsplit.style.height=c+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=f+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+c+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var n=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),u=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",u+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",u+=this.toolbarHeight);0<u&&!mxClient.IS_QUIRKS&&(u+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
+this.footerHeight+k,q=Math.max(0,Math.min(d-u-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=n+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=u+"px";this.sidebarContainer.style.width=n+"px";this.formatContainer.style.top=u+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";var f=this.getDiagramContainerOffset(),
+g=null!=this.hsplit.parentNode?n+this.splitSize:0;this.diagramContainer.style.left=g+f.x+"px";this.diagramContainer.style.top=u+f.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=n+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=g+"px");b?(this.menubarContainer.style.width=e+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-n-this.splitSize-c)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+q+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2352,13 +2352,13 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=t){var n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,c+(b?n.x-t.x:t.y-n.y)-e));mxEvent.consume(a);c!=m()&&(f=!0,g=null)}}function l(a){k(a);t=c=null}var t=null,c=null,f=!0,g=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){t=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));c=m();f=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!f&&this.hsplitClickEnabled){var c=null!=g?g-e:0;g=m();d(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};
-EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,l,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,d,k,l,t,c,f,g,m,p,n){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,l,t,p,c,f);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,g||340,m||100+20*b,!0,!1,n);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,l,t,c,f,g){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,l,t,c,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function k(a){if(null!=u){var m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?m.x-u.x:u.y-m.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function n(a){k(a);u=q=null}var u=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){u=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!c&&this.hsplitClickEnabled){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,n)})};
+EditorUi.prototype.handleError=function(a,b,e,d,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,n,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(a,b,e,d,k,n,u,q,c,f,g,l,m){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,k,n,u,l,q,c);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,f||340,g||100+20*b,!0,!1,m);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,k,n,u,q,c,f){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,k,n,u,q,c,f);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,d=[],k=0;k<b.length;k++){var l=a.isTableCell(b[k])?a.model.getParent(b[k]):b[k];null==l||e.get(l)||(e.put(l,!0),d.push(l))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),l=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(l.container,230,k,!0,!1);l.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,d=[],k=0;k<b.length;k++){var n=a.isTableCell(b[k])?a.model.getParent(b[k]):b[k];null==n||e.get(n)||(e.put(n,!0),d.push(n))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(u){this.handleError(u)}};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(n.container,230,k,!0,!1);n.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
@@ -2366,19 +2366,19 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=l&&0<l.length){var t=new Image;t.onload=function(){e(l,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var k=d.saveSelection(),n=mxUtils.prompt(a,b);d.restoreSelection(k);if(null!=n&&0<n.length){var u=new Image;u.onload=function(){e(n,u.width,u.height)};u.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};u.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,f,b){t.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(f=null!=f?f:1,b){d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),g=0;g<c.length;g++)if(d.getModel().isVertex(c[g])&&d.isCellResizable(c[g])){var e=d.getCellGeometry(c[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-f):38==a?e.height=Math.max(0,e.height-f):39==a?e.width+=f:40==a&&(e.height+=f),d.getModel().setGeometry(c[g],e))}}finally{d.getModel().endUpdate()}}else{var m=
-d.getSelectionCell(),e=d.model.getParent(m),c=null;1==d.getSelectionCount()&&d.model.isVertex(m)&&null!=d.layoutManager&&!d.isCellLocked(m)&&(c=d.layoutManager.getLayout(e));if(null!=c&&c.constructor==mxStackLayout)c=e.getIndex(m),37==a||38==a?d.model.add(e,m,Math.max(0,c-1)):39!=a&&40!=a||d.model.add(e,m,Math.min(d.model.getChildCount(e),c+1));else{c=d.getMovableCells(d.getSelectionCells());m=[];for(g=0;g<c.length;g++)e=d.getCurrentCellStyle(c[g]),"1"==mxUtils.getValue(e,"part","0")?(e=d.model.getParent(c[g]),
-d.model.isVertex(e)&&0>mxUtils.indexOf(c,e)&&m.push(e)):m.push(c[g]);0<m.length&&(c=e=0,37==a?e=-f:38==a?c=-f:39==a?e=f:40==a&&(c=f),d.moveCells(m,e,c))}}});null!=c&&window.clearTimeout(c);c=window.setTimeout(function(){if(0<t.length){d.getModel().beginUpdate();try{for(var a=0;a<t.length;a++)t[a]();t=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),l=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var t=[],c=
-null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},g=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
-function(){d.selectChildCell()};if(null!=f[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),f[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return g.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var m=this,p=k.escape;k.escape=function(a){p.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
-k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){m.ctrlEnter()}),k.bindAction(8,!1,"delete"),
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,f){u.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,f){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),e=0;e<b.length;e++)if(d.getModel().isVertex(b[e])&&d.isCellResizable(b[e])){var g=d.getCellGeometry(b[e]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-c):38==a?g.height=Math.max(0,g.height-c):39==a?g.width+=c:40==a&&(g.height+=c),d.getModel().setGeometry(b[e],g))}}finally{d.getModel().endUpdate()}}else{var m=
+d.getSelectionCell(),g=d.model.getParent(m),b=null;1==d.getSelectionCount()&&d.model.isVertex(m)&&null!=d.layoutManager&&!d.isCellLocked(m)&&(b=d.layoutManager.getLayout(g));if(null!=b&&b.constructor==mxStackLayout)b=g.getIndex(m),37==a||38==a?d.model.add(g,m,Math.max(0,b-1)):39!=a&&40!=a||d.model.add(g,m,Math.min(d.model.getChildCount(g),b+1));else{b=d.getMovableCells(d.getSelectionCells());m=[];for(e=0;e<b.length;e++)g=d.getCurrentCellStyle(b[e]),"1"==mxUtils.getValue(g,"part","0")?(g=d.model.getParent(b[e]),
+d.model.isVertex(g)&&0>mxUtils.indexOf(b,g)&&m.push(g)):m.push(b[e]);0<m.length&&(b=g=0,37==a?g=-c:38==a?b=-c:39==a?g=c:40==a&&(b=c),d.moveCells(m,g,b))}}});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<u.length){d.getModel().beginUpdate();try{for(var a=0;a<u.length;a++)u[a]();u=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,k=new mxKeyHandler(d),n=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var u=[],q=
+null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
+function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var f=d.connectVertex(d.getSelectionCell(),c[a.keyCode],d.defaultEdgeLength,a,!0);null!=f&&0<f.length&&(1==f.length&&d.model.isEdge(f[0])?d.setSelectionCell(d.model.getTerminal(f[0],!1)):d.setSelectionCell(f[f.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
+function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,c,f,d){var b=this.actions.get(f);null!=b&&(f=function(){b.isEnabled()&&b.funct()},c?d?k.bindControlShiftKey(a,f):k.bindControlKey(a,f):d?k.bindShiftKey(a,f):k.bindKey(a,f))});var g=this,l=k.escape;k.escape=function(a){l.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){d.exitGroup()});
+k.bindControlShiftKey(35,function(){d.enterGroup()});k.bindShiftKey(36,function(){d.home()});k.bindKey(35,function(){d.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),k.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),k.bindControlKey(13,function(){g.ctrlEnter()}),k.bindAction(8,!1,"delete"),
k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,
!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),
k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindAction(9,!1,"indent",!0),k.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),k.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",!0);return k};
@@ -2389,34 +2389,34 @@ Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(
mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();
mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};
-Graph=function(a,b,e,d,k,l){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=l?l:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,c=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(t=new mxPoint(b.getGraphX(),b.getGraphY()),m=this.isCellSelected(e.cell),f=e,c=b,null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var u=this.selectionCellsHandler.getHandler(e.cell);null!=u&&null!=u.bends&&0<u.bends.length&&(g=u.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(u=this.selectionCellsHandler.getHandler(e.cell),null==u||null==u.getHandleForEvent(b))){var p=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);p.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var n=this.model.getParent(e.cell),u=this.model.getParent(n);if(!this.isCellSelected(u)&&(mxUtils.intersects(p,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(u,0)!=n||mxUtils.intersects(p,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(p,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(p,new mxRectangle(e.x+e.width-
-2,e.y,2,e.height)))&&(n=this.selectionCellsHandler.isHandled(u),this.selectCellForEvent(u,b.getEvent()),u=this.selectionCellsHandler.getHandler(u),null!=u)){var B=u.getHandleForEvent(b);null!=B&&(u.start(b.getGraphX(),b.getGraphY(),B),u.blockDelayedSelection=!n,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(u=this.getActualStartSize(e.cell),n=this.view.scale,(0<u.x||0<u.width)&&mxUtils.intersects(p,
-new mxRectangle(e.x+(u.x-u.width-1)*n+(0==u.x?e.width:0),e.y,1,e.height))||(0<u.y||0<u.height)&&mxUtils.intersects(p,new mxRectangle(e.x,e.y+(u.y-u.height-1)*n+(0==u.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),u=this.selectionCellsHandler.getHandler(e.cell),null!=u&&(B=mxEvent.CUSTOM_HANDLE-u.customHandles.length+1,u.start(b.getGraphX(),b.getGraphY(),B),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
-mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=t&&null!=f&&null!=c){if(b=f,Math.abs(t.x-d.getGraphX())>e||Math.abs(t.y-d.getGraphY())>e){var u=this.selectionCellsHandler.getHandler(b.cell);null==u&&this.model.isEdge(b.cell)&&(u=this.createHandler(b));if(null!=u&&null!=u.bends&&0<u.bends.length){e=u.getHandleForEvent(c);
-var p=this.view.getEdgeStyle(b),n=p==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(e=g);if(n&&0!=e&&e!=u.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!n||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==u.bends.length-1||null!=b.visibleTargetState)n||e==mxEvent.LABEL_HANDLE||(n=b.absolutePoints,null!=n&&(null==p&&null==e||p==mxEdgeStyle.OrthConnector)&&(e=g,null==e&&(e=new mxRectangle(t.x,
-t.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,n[0].x,n[0].y)?e=0:mxUtils.contains(e,n[n.length-1].x,n[n.length-1].y)?e=u.bends.length-1:null!=p&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,t.x,t.y),e=null==p?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),u.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
-u&&(this.selectionCellsHandler.isHandlerActive(u)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,u),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||u.destroy());m=!1;t=c=f=g=null}}else if(b=d.getState(),null!=b){u=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),n=b.absolutePoints,null!=n)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
-d.getGraphX(),d.getGraphY()))u="move";else if(mxUtils.contains(e,n[0].x,n[0].y)||mxUtils.contains(e,n[n.length-1].x,n[n.length-1].y))u="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),u="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<n.length-1&&0<=e&&(u=0==Math.round(n[e].x-n[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
-1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(n=this.model.getParent(b.cell),p=this.model.getParent(n),!this.isCellSelected(p)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(n,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))u="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(e,new mxRectangle(b.x,
-b.y+b.height-2,b.width,3)))u="row-resize";for(n=b;null==u&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var p=this.getActualStartSize(n.cell),B=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(e,new mxRectangle(n.x+(p.x-p.width-1)*B+(0==p.x?n.width*B:0),n.y,1,n.height))?u="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(e,new mxRectangle(n.x,n.y+(p.y-p.height-1)*B+(0==p.y?n.height:0),n.width,1))&&(u="row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=
-u&&b.setCursor(u)}}),mouseUp:mxUtils.bind(this,function(a,b){g=t=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
-this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=p.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,
-b=this.graph.pageScale,d=f.width*b,f=f.height*b,b=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*d+b.x)*e,(g.y*f+b.y)*e,d*e,f*e));for(m=1;m<g.height;m++)c.push(new mxRectangle((g.x*d+b.x)*e,((g.y+m)*f+b.y)*e,d*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
-function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=n.apply(this,arguments),f=new mxDictionary,b=[],d=0;d<c.length;d++){var e=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&
-this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==e||f.get(e)||(f.put(e,!0),b.push(e))}return b};var v=this.graphHandler.start;this.graphHandler.start=function(a,c,f,b){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);
-return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var q=new mxRubberband(this);this.getRubberband=function(){return q};var x=(new Date).getTime(),y=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(x=(new Date).getTime(),y=0):y=(new Date).getTime()-x};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
-this.currentState&&a.getState()==this.currentState&&2E3<y||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=q.isForceRubberbandEvent;q.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
-mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(C=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=C)}));this.popupMenuHandler.autoExpand=
-!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
+Graph=function(a,b,e,d,k,n){mxGraph.call(this,a,b,e,d);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var u=null,q=null,c=null,f=null,g=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(u=new mxPoint(b.getGraphX(),b.getGraphY()),g=this.isCellSelected(e.cell),c=e,q=b,null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))f=mxEvent.LABEL_HANDLE;else{var l=this.selectionCellsHandler.getHandler(e.cell);null!=l&&null!=l.bends&&0<l.bends.length&&(f=l.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(l=this.selectionCellsHandler.getHandler(e.cell),null==l||null==l.getHandleForEvent(b))){var v=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);v.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var m=this.model.getParent(e.cell),l=this.model.getParent(m);if(!this.isCellSelected(l)&&(mxUtils.intersects(v,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(l,0)!=m||mxUtils.intersects(v,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(v,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(m,0)!=e.cell||mxUtils.intersects(v,new mxRectangle(e.x+e.width-
+2,e.y,2,e.height)))&&(m=this.selectionCellsHandler.isHandled(l),this.selectCellForEvent(l,b.getEvent()),l=this.selectionCellsHandler.getHandler(l),null!=l)){var A=l.getHandleForEvent(b);null!=A&&(l.start(b.getGraphX(),b.getGraphY(),A),l.blockDelayedSelection=!m,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(l=this.getActualStartSize(e.cell),m=this.view.scale,(0<l.x||0<l.width)&&mxUtils.intersects(v,
+new mxRectangle(e.x+(l.x-l.width-1)*m+(0==l.x?e.width:0),e.y,1,e.height))||(0<l.y||0<l.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(l.y-l.height-1)*m+(0==l.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),l=this.selectionCellsHandler.getHandler(e.cell),null!=l&&(A=mxEvent.CUSTOM_HANDLE-l.customHandles.length+1,l.start(b.getGraphX(),b.getGraphY(),A),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
+mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=u&&null!=c&&null!=q){if(b=c,Math.abs(u.x-d.getGraphX())>e||Math.abs(u.y-d.getGraphY())>e){var l=this.selectionCellsHandler.getHandler(b.cell);null==l&&this.model.isEdge(b.cell)&&(l=this.createHandler(b));if(null!=l&&null!=l.bends&&0<l.bends.length){e=l.getHandleForEvent(q);
+var v=this.view.getEdgeStyle(b),m=v==mxEdgeStyle.EntityRelation;g||f!=mxEvent.LABEL_HANDLE||(e=f);if(m&&0!=e&&e!=l.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!m||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==l.bends.length-1||null!=b.visibleTargetState)m||e==mxEvent.LABEL_HANDLE||(m=b.absolutePoints,null!=m&&(null==v&&null==e||v==mxEdgeStyle.OrthConnector)&&(e=f,null==e&&(e=new mxRectangle(u.x,
+u.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,m[0].x,m[0].y)?e=0:mxUtils.contains(e,m[m.length-1].x,m[m.length-1].y)?e=l.bends.length-1:null!=v&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,u.x,u.y),e=null==v?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),l.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
+l&&(this.selectionCellsHandler.isHandlerActive(l)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,l),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||l.destroy());g=!1;u=q=c=f=null}}else if(b=d.getState(),null!=b){l=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),m=b.absolutePoints,null!=m)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
+d.getGraphX(),d.getGraphY()))l="move";else if(mxUtils.contains(e,m[0].x,m[0].y)||mxUtils.contains(e,m[m.length-1].x,m[m.length-1].y))l="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),l="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<m.length-1&&0<=e&&(l=0==Math.round(m[e].x-m[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
+1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(m=this.model.getParent(b.cell),v=this.model.getParent(m),!this.isCellSelected(v)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(m,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))l="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(v,0)!=m||mxUtils.intersects(e,new mxRectangle(b.x,
+b.y+b.height-2,b.width,3)))l="row-resize";for(m=b;null==l&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var v=this.getActualStartSize(m.cell),A=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(m.x+(v.x-v.width-1)*A+(0==v.x?m.width*A:0),m.y,1,m.height))?l="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(m.x,m.y+(v.y-v.height-1)*A+(0==v.y?m.height:0),m.width,1))&&(l="row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=
+l&&b.setCursor(l)}}),mouseUp:mxUtils.bind(this,function(a,b){f=u=q=c=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=l.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,
+f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)c.push(new mxRectangle(((g.x+m)*d+f.x)*e,(g.y*b+f.y)*e,d*e,b*e));for(m=1;m<g.height;m++)c.push(new mxRectangle((g.x*d+f.x)*e,((g.y+m)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var m=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=m.apply(this,arguments),b=new mxDictionary,f=[],d=0;d<c.length;d++){var e=this.graph.isTableCell(a)&&this.graph.isTableCell(c[d])&&this.graph.isCellSelected(c[d])?this.graph.model.getParent(c[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(c[d])&&
+this.graph.isCellSelected(c[d])?c[d]:this.graph.getCompositeParent(c[d]);null==e||b.get(e)||(b.put(e,!0),f.push(e))}return f};var t=this.graphHandler.start;this.graphHandler.start=function(a,c,b,f){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var x=(new Date).getTime(),C=0,z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;z.apply(this,arguments);a!=this.currentState?(x=(new Date).getTime(),C=0):C=(new Date).getTime()-x};var D=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
+this.currentState&&a.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&D.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(a){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var y=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return y.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
+mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(B=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=B)}));this.popupMenuHandler.autoExpand=
+!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var E=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return E.apply(this,arguments);var b=c?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);
-return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var I=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return I.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var K=
-this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:K.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var u=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();
-u=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),b=c.getProperty("cell");null==b?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),q.start(f.x,f.y)):null!=u?this.addSelectionCells(u):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);u=null;c.consume()}}));
-this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
-null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var H=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return H.apply(this,arguments)};this.selectRegion=function(a,c){var b=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(b,c);return b};var G=
+this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:G.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();
+v=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),p.start(b.x,b.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);v=null;c.consume()}}));
+this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var b=a.view.graph;return c&&(b.isCellSelected(a.cell)||b.isTableRow(a.cell)&&b.selectionCellsHandler.isHandled(b.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
+null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var K=this.updateMouseEvent;this.updateMouseEvent=function(a){a=K.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,b,e,d,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
Graph.zapGremlins=function(a){for(var b=0,e=[],d=0;d<a.length;d++){var k=a.charCodeAt(d);(32<=k||9==k||10==k||13==k)&&65535!=k&&65534!=k||(e.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&e.push(a.substring(b));return 0==e.length?a:e.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
@@ -2427,21 +2427,21 @@ Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];
Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,b=!0,l=null,t=mxUtils.bind(this,function(a){b=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),c=mxUtils.bind(this,function(a){b=b&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<d&&Math.abs(l.y-mxEvent.getClientY(a))<d}),f=mxUtils.bind(this,function(c){if(b)for(var f=mxEvent.getSource(c);null!=
-f&&f!=e.node;){if("a"==f.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,f,c);break}f=f.parentNode}});mxEvent.addGestureListeners(e.node,t,c,f);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,n=null,u=mxUtils.bind(this,function(a){k=!0;n=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=n&&Math.abs(n.x-mxEvent.getClientX(a))<b&&Math.abs(n.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(k)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,u,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(a,b){a=null!=a?a:!0;b=null!=b?b:!0;var d=this.model;return d.filterDescendants(function(e){return a&&d.isVertex(e)||b&&d.isEdge(e)},d.getRoot())};Graph.prototype.getStartEditingCell=function(a,b){var d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==
d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),d=this.getCellStyle(a),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&(!this.isSwimlane(a)||0==d)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(d=0;d<this.model.getChildCount(a);d++){var e=this.model.getChildAt(a,d);if(this.isCellEditable(e)){a=e;break}}return a};Graph.prototype.copyStyle=function(a){var b=null;if(null!=a){b=mxUtils.clone(this.getCurrentCellStyle(a));
-a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var e=a[d],c=e.indexOf("=");if(0<=c){var f=e.substring(0,c),e=e.substring(c+1);null==b[f]&&e==mxConstants.NONE&&(b[f]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,e){e=null!=e?e:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<b.length;d++)for(var c=this.getCurrentCellStyle(b[d]),f=0;f<e.length;f++){var g=c[e[f]],m=a[e[f]];g==m||null==g&&m==mxConstants.NONE||this.setCellStyles(e[f],
-m,[b[d]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,t,c,f){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-
-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,t,c,f){t=null!=t?t:!0;c=null!=c?c:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var m=this.model.getChildAt(e,d),p=this.getScaledCellAt(a,b,m,t,c,f);if(null!=p)return p;if(this.isCellVisible(m)&&(c&&this.model.isEdge(m)||t&&this.model.isVertex(m))&&(p=this.view.getState(m),null!=p&&(null==
-f||!f(p,a,b))&&this.intersects(p,a,b)))return m}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
+a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var d=0;d<a.length;d++){var e=a[d],q=e.indexOf("=");if(0<=q){var c=e.substring(0,q),e=e.substring(q+1);null==b[c]&&e==mxConstants.NONE&&(b[c]=mxConstants.NONE)}}}return b};Graph.prototype.pasteStyle=function(a,b,e){e=null!=e?e:Graph.pasteStyles;this.model.beginUpdate();try{for(var d=0;d<b.length;d++)for(var k=this.getCurrentCellStyle(b[d]),c=0;c<e.length;c++){var f=k[e[c]],g=a[e[c]];f==g||null==f&&g==mxConstants.NONE||this.setCellStyles(e[c],
+g,[b[d]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,u,q,c){this.useCssTransforms&&(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-
+this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,u,q,c){u=null!=u?u:!0;q=null!=q?q:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var f=this.model.getChildCount(e)-1;0<=f;f--){var d=this.model.getChildAt(e,f),l=this.getScaledCellAt(a,b,d,u,q,c);if(null!=l)return l;if(this.isCellVisible(d)&&(q&&this.model.isEdge(d)||u&&this.model.isVertex(d))&&(l=this.view.getState(d),null!=l&&(null==
+c||!c(l,a,b))&&this.intersects(l,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")||this.isTableCell(a)||this.isTableRow(a)};Graph.prototype.getCompositeParent=function(a){for(;this.isPart(a);){var b=
this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?
this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,
-this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var t=
-a.style.display;a.style.display="none";a.getBBox();a.style.display=t}}catch(c){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,l=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=l)};var e=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(a,b,l){var d=this.useCssTransforms,c=this.view.scale,f=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=c,this.view.translate=f,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var u=
+a.style.display;a.style.display="none";a.getBBox();a.style.display=u}}catch(q){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,n=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=n)};var e=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(a,b,n){var d=this.useCssTransforms,k=this.view.scale,c=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=k,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(l){}return d};
+Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(n){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var e=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,b)){e=this.graph.getCellStyle(a);if("stackLayout"==e.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(e,
@@ -2456,36 +2456,36 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,t=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var c=e?"getUTC":"get",f=a[c+"Date"](),g=a[c+"Day"](),m=a[c+"Month"](),p=a[c+"FullYear"](),n=a[c+"Hours"](),v=a[c+"Minutes"](),q=a[c+"Seconds"](),c=a[c+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),y={d:f,dd:t(f),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:m+1,mm:t(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:v,MM:t(v),s:q,ss:t(q),l:t(c,3),L:t(99<c?Math.round(c/10):c),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<x?"-":"+")+t(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,u=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),g=a[q+"Month"](),l=a[q+"FullYear"](),m=a[q+"Hours"](),t=a[q+"Minutes"](),p=a[q+"Seconds"](),q=a[q+"Milliseconds"](),x=e?0:a.getTimezoneOffset(),C={d:c,dd:u(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:g+1,mm:u(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(l).slice(2),yyyy:l,h:m%12||12,hh:u(m%12||12),H:m,HH:u(m),M:t,MM:u(t),s:p,ss:u(p),l:u(q,3),L:u(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(n,""),o:(0<x?"-":"+")+u(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in C?C[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(d)&&(k.setAttribute("checked","checked"),
-k.defaultChecked=!0);e.appendChild(k);var c=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",c);mxUtils.write(e,c);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var t=k.substring(1,k.length-1);if("id"==t)l=a.id;else if(0>t.indexOf("{"))for(var c=a;null==l&&null!=c;)null!=c.value&&"object"==typeof c.value&&(l=c.hasAttribute(t)?null!=c.getAttribute(t)?c.getAttribute(t):"":null),c=this.model.getParent(c);
-null==l&&(l=this.getGlobalVariable(t))}e.push(b.substring(d,match.index)+(null!=l?l:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+k.defaultChecked=!0);e.appendChild(k);var q=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(d,k.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var n=null;if(match.index>d&&"%"==b.charAt(match.index-1))n=k.substring(1);else{var u=k.substring(1,k.length-1);if("id"==u)n=a.id;else if(0>u.indexOf("{"))for(var q=a;null==n&&null!=q;)null!=q.value&&"object"==typeof q.value&&(n=q.hasAttribute(u)?null!=q.getAttribute(u)?q.getAttribute(u):"":null),q=this.model.getParent(q);
+null==n&&(n=this.getGlobalVariable(u))}e.push(b.substring(d,match.index)+(null!=n?n:k));d=match.index+k.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,e,d,k,l,t,c){l=l?l:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var f=this.isCloneConnectSource(a),g=f?a:this.getCompositeParent(a),m=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);b==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=e):b==
-mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+e):(m.x=b==mxConstants.DIRECTION_WEST?m.x-e:m.x+(g.geometry.width+e),m.y+=g.geometry.height/2);var p=this.view.getState(this.model.getParent(a));e=this.view.scale;var n=this.view.translate,g=n.x*e,n=n.y*e;null!=p&&this.model.isVertex(p.cell)&&(g=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);l=l?null:(new mxRectangle(g+m.x*e,n+m.y*e)).grow(40);l=null!=l?this.getCells(0,
-0,0,0,null,null,l):null;var v=null!=l&&0<l.length?l.reverse()[0]:null,q=!1;null!=v&&this.model.isAncestor(v,a)&&(q=!0,v=null);null==v&&(l=this.getSwimlaneAt(g+m.x*e,n+m.y*e),null!=l&&(q=!1,v=l));for(l=v;null!=l;){if(this.isCellLocked(l)){v=null;break}l=this.model.getParent(l)}null!=v&&(l=this.view.getState(a),p=this.view.getState(v),null!=l&&null!=p&&mxUtils.intersects(l,p)&&(v=null));var x=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;x&&(b==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/
-2:b==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=b==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);null==v||this.isCellConnectable(v)||this.isSwimlane(v)||(k=this.getModel().getParent(v),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(v=k));if(v==a||this.model.isEdge(v)||!this.isCellConnectable(v)&&!this.isSwimlane(v))v=null;var y=[],D=null!=v&&this.isSwimlane(v),z=D?null:v;k=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();
-try{if(null==z&&x){for(var g=null!=e?e:a,p=this.getCellGeometry(g);null!=p&&p.relative;)g=this.getModel().getParent(g),p=this.getCellGeometry(g);g=f?a:this.getCompositeParent(g);z=null!=e?e:this.duplicateCells([g],!1)[0];null!=e&&this.addCells([z],this.model.getParent(a),null,null,null,!0);p=this.getCellGeometry(z);null!=p&&(p.x=m.x-p.width/2,p.y=m.y-p.height/2);D?(this.addCells([z],v,null,null,null,!0),v=null):!x||null!=v||q||f||this.addCells([z],this.getDefaultParent(),null,null,null,!0)}var n=
-mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&x||null==v&&f?null:this.insertEdge(this.model.getParent(a),null,"",a,z,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var k=null;for(e=a;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=n.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==n.parent&&(k=e.parent.getIndex(e),this.model.add(e.parent,n,k))}null==v&&null!=z&&null!=a.parent&&f&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),
-this.model.add(a.parent,z,k));null!=n&&y.push(n);null==v&&null!=z&&y.push(z);null==z&&null!=n&&n.geometry.setTerminalPoint(m,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}}if(null!=c)c(y);else return y});if(null==t||null!=z||!x||null==v&&f)return k(z);t(g+m.x*e,n+m.y*e,k)};
+Graph.prototype.connectVertex=function(a,b,e,d,k,n,u,q){n=n?n:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var c=this.isCloneConnectSource(a),f=c?a:this.getCompositeParent(a),g=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(f.geometry.x,f.geometry.y);b==mxConstants.DIRECTION_NORTH?(g.x+=f.geometry.width/2,g.y-=e):b==
+mxConstants.DIRECTION_SOUTH?(g.x+=f.geometry.width/2,g.y+=f.geometry.height+e):(g.x=b==mxConstants.DIRECTION_WEST?g.x-e:g.x+(f.geometry.width+e),g.y+=f.geometry.height/2);var l=this.view.getState(this.model.getParent(a));e=this.view.scale;var m=this.view.translate,f=m.x*e,m=m.y*e;null!=l&&this.model.isVertex(l.cell)&&(f=l.x,m=l.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);n=n?null:(new mxRectangle(f+g.x*e,m+g.y*e)).grow(40);n=null!=n?this.getCells(0,
+0,0,0,null,null,n):null;var t=null!=n&&0<n.length?n.reverse()[0]:null,p=!1;null!=t&&this.model.isAncestor(t,a)&&(p=!0,t=null);null==t&&(n=this.getSwimlaneAt(f+g.x*e,m+g.y*e),null!=n&&(p=!1,t=n));for(n=t;null!=n;){if(this.isCellLocked(n)){t=null;break}n=this.model.getParent(n)}null!=t&&(n=this.view.getState(a),l=this.view.getState(t),null!=n&&null!=l&&mxUtils.intersects(n,l)&&(t=null));var x=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;x&&(b==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/
+2:b==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=b==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==t||this.isCellConnectable(t)||this.isSwimlane(t)||(k=this.getModel().getParent(t),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(t=k));if(t==a||this.model.isEdge(t)||!this.isCellConnectable(t)&&!this.isSwimlane(t))t=null;var C=[],z=null!=t&&this.isSwimlane(t),D=z?null:t;k=mxUtils.bind(this,function(f){if(null==u||null!=f||null==t&&c){this.model.beginUpdate();
+try{if(null==D&&x){for(var e=null!=f?f:a,m=this.getCellGeometry(e);null!=m&&m.relative;)e=this.getModel().getParent(e),m=this.getCellGeometry(e);e=c?a:this.getCompositeParent(e);D=null!=f?f:this.duplicateCells([e],!1)[0];null!=f&&this.addCells([D],this.model.getParent(a),null,null,null,!0);m=this.getCellGeometry(D);null!=m&&(m.x=g.x-m.width/2,m.y=g.y-m.height/2);z?(this.addCells([D],t,null,null,null,!0),t=null):!x||null!=t||p||c||this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var l=
+mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&x||null==t&&c?null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var k=null;for(f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=l.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==l.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,l,k))}null==t&&null!=D&&null!=a.parent&&c&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),
+this.model.add(a.parent,D,k));null!=l&&C.push(l);null==t&&null!=D&&C.push(D);null==D&&null!=l&&l.geometry.setTerminalPoint(g,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=q)q(C);else return C});if(null==u||null!=D||!x||null==t&&c)return k(D);u(f+g.x*e,m+g.y*e,k)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var t=this.view.getState(e[l]),c=this.getCellGeometry(e[l]);if(null!=t&&null!=c){var f=Math.round(c.width-t.width/this.view.scale),g=Math.round(c.height-t.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(e[l]),p=this.layoutManager.getLayout(m);
-null==p?null!=k&&this.isMoveCellsEvent(k,t)&&this.moveSiblings(t,m,f,g):null!=k&&mxEvent.isAltDown(k)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var l=this.view.getState(k[b]),t=this.getCellGeometry(k[b]);null!=l&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var l=this.getCellGeometry(a),t=this.view.getState(a);null!=t&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,t.width/this.view.scale-l.width):l.height+=d+Math.min(0,t.height/this.view.scale-l.height),this.model.setGeometry(a,
-l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(a,b,e,d,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var u=this.view.getState(e[n]),q=this.getCellGeometry(e[n]);if(null!=u&&null!=q){var c=Math.round(q.width-u.width/this.view.scale),f=Math.round(q.height-u.height/this.view.scale);if(0!=f||0!=c){var g=this.model.getParent(e[n]),l=this.layoutManager.getLayout(g);
+null==l?null!=k&&this.isMoveCellsEvent(k,u)&&this.moveSiblings(u,g,c,f):null!=k&&mxEvent.isAltDown(k)||l.constructor!=mxStackLayout||l.resizeLast||this.resizeParentStacks(g,l,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var n=this.view.getState(k[b]),u=this.getCellGeometry(k[b]);null!=n&&null!=u&&(u=u.clone(),u.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(n.y-a.y)/a.height)))),this.model.setGeometry(k[b],u))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var n=this.getCellGeometry(a),u=this.view.getState(a);null!=u&&null!=n&&(n=n.clone(),b.horizontal?n.width+=e+Math.min(0,u.width/this.view.scale-n.width):n.height+=d+Math.min(0,u.height/this.view.scale-n.height),this.model.setGeometry(a,
+n));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(a,b,e){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var e=this.container.clientWidth-b,d=this.container.clientHeight-b,k=Math.floor(20*Math.min(e/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var l=this.view.translate;this.container.scrollTop=(a.y+l.y)*k-Math.max((d-a.height*k)/2+b/2,0);this.container.scrollLeft=(a.x+l.x)*k-Math.max((e-a.width*k)/2+b/2,0)}};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var e=this.container.clientWidth-b,d=this.container.clientHeight-b,k=Math.floor(20*Math.min(e/a.width,d/a.height))/20;this.zoomTo(k);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(a.y+n.y)*k-Math.max((d-a.height*k)/2+b/2,0);this.container.scrollLeft=(a.x+n.x)*k-Math.max((e-a.width*k)/2+b/2,0)}};
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&d.push({name:a[k].nodeName,value:a[k].nodeValue});d.sort(function(a,b){return a.name<b.name?
-1:a.name>b.name?1:0});for(k=0;k<d.length;k++)"link"==d[k].name&&this.isCustomLink(d[k].value)||(b+=("link"!=d[k].name?"<b>"+d[k].name+":</b> ":"")+mxUtils.htmlEntities(d[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2497,8 +2497,8 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.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(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var l=this.getState(d.getState());
-null==l&&mxEvent.isTouchEvent(e)||this.update(l)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(d.getState());
+null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||
this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
@@ -2508,175 +2508,175 @@ this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=funct
HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),l=e.getGraphY(),k=this.getStateAt(a,k,l);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,e):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),k=e.getGraphX(),n=e.getGraphY(),k=this.getStateAt(a,k,n);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(d)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,e):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(a,b,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,e,mxEvent.isControlDown(e),mxEvent.isControlDown(e)),e,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var e=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
-(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,f,b){if(null!=e){var c=new mxRectangle(f,b,a.clientWidth,a.clientHeight);mxUtils.intersects(c,e)&&(a==this.arrowUp?b-=c.y+c.height-e.y:a==this.arrowRight?f+=e.x+e.width-c.x:a==this.arrowDown?b+=e.y+e.height-c.y:a==this.arrowLeft&&(f-=c.x+c.width-e.x))}a.style.left=f+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
+(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,c,b){if(null!=e){var f=new mxRectangle(c,b,a.clientWidth,a.clientHeight);mxUtils.intersects(f,e)&&(a==this.arrowUp?b-=f.y+f.height-e.y:a==this.arrowRight?c+=e.x+e.width-f.x:a==this.arrowDown?b+=e.y+e.height-f.y:a==this.arrowLeft&&(c-=f.x+f.width-e.x))}a.style.left=c+"px";a.style.top=b+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var l=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(a,f){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==l||c.height<3*l.height&&c.width<3*l.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(b,this.arrowRight);t(d,this.arrowLeft);t(k,this.arrowUp);t(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==k&&k==a&&(a=k=d=b=null);var n=this.graph.getCellGeometry(this.currentState.cell),u=mxUtils.bind(this,function(a,c){var b=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==b||null==n||b.height<3*n.height&&b.width<3*n.width)?c.style.visibility="visible":c.style.visibility="hidden"});u(b,this.arrowRight);u(d,this.arrowLeft);u(k,this.arrowUp);u(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var l=0;l<e;l++){var t=this.cloneCell(b),c=this.getCellGeometry(t);null!=c&&(c.x+=l*d,c.y+=l*k);a.insert(t)}return a};
-Graph.prototype.createTable=function(a,b,e,d,k,l,t,c,f){e=null!=e?e:60;d=null!=d?d:40;l=null!=l?l:30;c=null!=c?c:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
-0,0,b*e,a*d+(null!=k?l:0),null!=t?t:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?l:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,c),this.createVertex(null,null,"",0,0,e,d,f),b,e,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,b,e){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=e&&(d[k].value=e[k]),null!=b)for(var l=this.model.getChildCells(d[k],!0),t=0;t<l.length;t++)null!=b[k][t]&&(l[t].value=b[k][t]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d,k,l,t,c,f){e=null!=e?e:120;d=null!=d?d:120;k=null!=k?k:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-k=this.createVertex(null,null,"",0,0,b*e,a*d,null!=l?l:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");l=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=l;k.geometry.height+=l;t=this.createVertex(null,null,"",0,l,b*e+l,d,t);k.insert(this.createParent(t,this.createVertex(null,null,"",l,0,e,d,c),b,e,0));return 1<a?(t.geometry.y=
-d+l,this.createParent(k,this.createParent(t,this.createVertex(null,null,"",l,0,e,d,f),b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=b;d.setGeometry(a,k);var l=d.getParent(a),t=d.getChildCells(l,!0);if(!e){var c=mxUtils.indexOf(t,a);if(c<t.length-1){var f=t[c+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=b,g.height-=b,d.setGeometry(f,g))}}var m=this.getCellGeometry(l);null!=m&&(e||(e=a==t[t.length-1]),e&&(m=m.clone(),m.height+=b,d.setGeometry(l,m)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(l,!0)}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var d=this.getModel(),k=d.getParent(a),l=d.getParent(k),t=d.getChildCells(k,!0);a=mxUtils.indexOf(t,a);var c=a==t.length-1;d.beginUpdate();try{for(var f=d.getChildCells(l,!0),g=0;g<f.length;g++){var k=f[g],t=d.getChildCells(k,!0),m=t[a],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=b,d.setGeometry(m,p));a<t.length-1&&(m=t[a+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),p.x+=b,e||(p.width-=b),d.setGeometry(m,p)))}if(c||
-e){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.width+=b,d.setGeometry(l,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(l,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
-TableLayout.prototype.getSize=function(a,b){for(var e=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(e+=b?k.width:k.height)}return e};TableLayout.prototype.getRowLayout=function(a,b){for(var e=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(e,!0),l=b-d.x-d.width,t=[],d=d.x,c=0;c<e.length;c++){var f=this.graph.getCellGeometry(e[c]);null!=f&&(d+=f.width*l/k,t.push(Math.round(d)))}return t};
-TableLayout.prototype.layoutRow=function(a,b,e,d){var k=this.graph.getModel(),l=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var t=a.x,c=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var f=0;f<l.length;f++){var g=this.graph.getCellGeometry(l[f]);null!=g&&(g=g.clone(),g.y=a.y,g.height=e-a.y-a.height,null!=b?(g.x=b[f],g.width=b[f+1]-g.x,f==l.length-1&&f<b.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=t,t+=g.width,f==l.length-1?g.width=d-a.x-a.width-c:c+=g.width),k.setGeometry(l[f],g))}return c};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),l="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),t=this.graph.getModel(),c=0;t.beginUpdate();try{var f=e.height-b.y-b.height,g=e.width-b.x-b.width,m=t.getChildCells(a,!0),p=this.getSize(m,!1);if(0<f&&0<g&&0<m.length&&0<p){if(k){var n=this.graph.getCellGeometry(m[m.length-
-1]);null!=n&&(n=n.clone(),n.height=f-p+n.height,t.setGeometry(m[m.length-1],n))}for(var v=l?null:this.getRowLayout(m[0],g),q=b.y,x=0;x<m.length;x++)n=this.graph.getCellGeometry(m[x]),null!=n&&(n=n.clone(),n.x=b.x,n.width=g,n.y=Math.round(q),q=k||d?q+n.height:q+n.height/p*f,n.height=Math.round(q)-n.y,t.setGeometry(m[x],n)),c=Math.max(c,this.layoutRow(m[x],v,n.height,g));d&&f<p&&(e=e.clone(),e.height=q+b.height,t.setGeometry(a,e));l&&g<c+Graph.minTableColumnWidth&&(e=e.clone(),e.width=c+b.width+b.x+
-Graph.minTableColumnWidth,t.setGeometry(a,e))}}finally{t.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var f=this.getState(a);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=b.apply(this,
-arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,c){return e.apply(this,arguments)||null!=a.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
-1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=a.routedPoints,b=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var d=function(c,f,d){var e=new mxPoint(f,d);e.type=c;b.push(e);e=null!=a.routedPoints?a.routedPoints[b.length-1]:null;return null==e||e.type!=c||e.x!=f||e.y!=d},e=.5*this.scale,f=!1,b=[],q=0;q<c.length-1;q++){for(var k=
-c[q+1],l=c[q],t=[],z=c[q+2];q<c.length-2&&mxUtils.ptSegDistSq(l.x,l.y,z.x,z.y,k.x,k.y)<1*this.scale*this.scale;)k=z,q++,z=c[q+2];for(var f=d(0,l.x,l.y)||f,E=0;E<this.validEdges.length;E++){var A=this.validEdges[E],C=A.absolutePoints;if(null!=C&&mxUtils.intersects(a,A)&&"1"!=A.style.noJump)for(A=0;A<C.length-1;A++){for(var G=C[A+1],F=C[A],z=C[A+2];A<C.length-2&&mxUtils.ptSegDistSq(F.x,F.y,z.x,z.y,G.x,G.y)<1*this.scale*this.scale;)G=z,A++,z=C[A+2];z=mxUtils.intersection(l.x,l.y,k.x,k.y,F.x,F.y,G.x,
-G.y);if(null!=z&&(Math.abs(z.x-l.x)>e||Math.abs(z.y-l.y)>e)&&(Math.abs(z.x-k.x)>e||Math.abs(z.y-k.y)>e)&&(Math.abs(z.x-F.x)>e||Math.abs(z.y-F.y)>e)&&(Math.abs(z.x-G.x)>e||Math.abs(z.y-G.y)>e)){G=z.x-l.x;F=z.y-l.y;z={distSq:G*G+F*F,x:z.x,y:z.y};for(G=0;G<t.length;G++)if(t[G].distSq>z.distSq){t.splice(G,0,z);z=null;break}null==z||0!=t.length&&t[t.length-1].x===z.x&&t[t.length-1].y===z.y||t.push(z)}}}for(A=0;A<t.length;A++)f=d(1,t[A].x,t[A].y)||f}z=c[c.length-1];f=d(0,z.x,z.y)||f}a.routedPoints=b;return f}return!1};
-var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,c,b){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,d=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
-"jumpStyle","none"),g=!0,m=null,l=null,t=[],z=null;a.begin();for(var E=0;E<this.state.routedPoints.length;E++){var A=this.state.routedPoints[E],C=new mxPoint(A.x/this.scale,A.y/this.scale);0==E?C=c[0]:E==this.state.routedPoints.length-1&&(C=c[c.length-1]);var G=!1;if(null!=m&&1==A.type){var F=this.state.routedPoints[E+1],A=F.x/this.scale-C.x,F=F.y/this.scale-C.y,A=A*A+F*F;null==z&&(z=new mxPoint(C.x-m.x,C.y-m.y),l=Math.sqrt(z.x*z.x+z.y*z.y),0<l?(z.x=z.x*d/l,z.y=z.y*d/l):z=null);A>d*d&&0<l&&(A=m.x-
-C.x,F=m.y-C.y,A=A*A+F*F,A>d*d&&(G=new mxPoint(C.x-z.x,C.y-z.y),A=new mxPoint(C.x+z.x,C.y+z.y),t.push(G),this.addPoints(a,t,b,f,!1,null,g),t=0>Math.round(z.x)||0==Math.round(z.x)&&0>=Math.round(z.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(G.x-z.y*t,G.y+z.x*t),a.lineTo(A.x-z.y*t,A.y+z.x*t),a.lineTo(A.x,A.y)):"arc"==e?(t*=1.3,a.curveTo(G.x-z.y*t,G.y+z.x*t,A.x-z.y*t,A.y+z.x*t,A.x,A.y)):(a.moveTo(A.x,A.y),g=!0),t=[A],G=!0))}else z=null;G||(t.push(C),m=C)}this.addPoints(a,t,b,f,!1,null,g);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,c,b,d){if(null==c||null==a||"1"!=c.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{c=this.getTerminalPort(a,c,d);var f=this.getNextPoint(a,b,d),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=g)var p=Math.cos(-g),k=Math.sin(-g),f=mxUtils.getRotatedPoint(f,p,k,m);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(c,f,0==g&&e,p);0!=g&&(p=Math.cos(g),k=Math.sin(g),f=mxUtils.getRotatedPoint(f,p,k,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,c,b,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,c,b,d,e){if(null!=c&&null!=a){a=this.graph.getAllConnectionConstraints(c);d=b=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(c,
-a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||m<d)b=g,d=m}}null!=b&&(e=b)}return e};var t=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,b){var f=t.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(f=b.state.view.graph.replacePlaceholders(b.state.cell,f));return f};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var f=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var b=f.substring(8,f.length-1),d=mxUtils.parseXml(Graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",k,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,k){a=this.cloneCell(a);for(var n=0;n<e;n++){var u=this.cloneCell(b),q=this.getCellGeometry(u);null!=q&&(q.x+=n*d,q.y+=n*k);a.insert(u)}return a};
+Graph.prototype.createTable=function(a,b,e,d,k,n,u,q,c){e=null!=e?e:60;d=null!=d?d:40;n=null!=n?n:30;q=null!=q?q:"shape=partialRectangle;html=1;whiteSpace=wrap;collapsible=0;dropTarget=0;pointerEvents=0;fillColor=none;top=0;left=0;bottom=0;right=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";c=null!=c?c:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;";return this.createParent(this.createVertex(null,null,null!=k?k:"",
+0,0,b*e,a*d+(null!=k?n:0),null!=u?u:"shape=table;html=1;whiteSpace=wrap;startSize="+(null!=k?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,q),this.createVertex(null,null,"",0,0,e,d,c),b,e,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,b,e){for(var d=this.model.getChildCells(a,!0),k=0;k<d.length;k++)if(null!=e&&(d[k].value=e[k]),null!=b)for(var n=this.model.getChildCells(d[k],!0),u=0;u<n.length;u++)null!=b[k][u]&&(n[u].value=b[k][u]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d,k,n,u,q,c){e=null!=e?e:120;d=null!=d?d:120;k=null!=k?k:40;u=null!=u?u:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";q=null!=q?q:"swimlane;connectable=0;startSize=40;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";c=null!=c?c:"swimlane;connectable=0;startSize=0;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+k=this.createVertex(null,null,"",0,0,b*e,a*d,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+k+";html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=n;k.geometry.height+=n;u=this.createVertex(null,null,"",0,n,b*e+n,d,u);k.insert(this.createParent(u,this.createVertex(null,null,"",n,0,e,d,q),b,e,0));return 1<a?(u.geometry.y=
+d+n,this.createParent(k,this.createParent(u,this.createVertex(null,null,"",n,0,e,d,c),b,e,0),a-1,0,d)):k};Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var d=this.getModel();d.beginUpdate();try{var k=this.getCellGeometry(a);if(null!=k){k=k.clone();k.height+=b;d.setGeometry(a,k);var n=d.getParent(a),u=d.getChildCells(n,!0);if(!e){var q=mxUtils.indexOf(u,a);if(q<u.length-1){var c=u[q+1],f=this.getCellGeometry(c);null!=f&&(f=f.clone(),f.y+=b,f.height-=b,d.setGeometry(c,f))}}var g=this.getCellGeometry(n);null!=g&&(e||(e=a==u[u.length-1]),e&&(g=g.clone(),g.height+=b,d.setGeometry(n,g)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var d=this.getModel(),k=d.getParent(a),n=d.getParent(k),u=d.getChildCells(k,!0);a=mxUtils.indexOf(u,a);var q=a==u.length-1;d.beginUpdate();try{for(var c=d.getChildCells(n,!0),f=0;f<c.length;f++){var k=c[f],u=d.getChildCells(k,!0),g=u[a],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.width+=b,d.setGeometry(g,l));a<u.length-1&&(g=u[a+1],l=this.getCellGeometry(g),null!=l&&(l=l.clone(),l.x+=b,e||(l.width-=b),d.setGeometry(g,l)))}if(q||
+e){var m=this.getCellGeometry(n);null!=m&&(m=m.clone(),m.width+=b,d.setGeometry(n,m))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};
+TableLayout.prototype.getSize=function(a,b){for(var e=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(e+=b?k.width:k.height)}return e};TableLayout.prototype.getRowLayout=function(a,b){for(var e=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(e,!0),n=b-d.x-d.width,u=[],d=d.x,q=0;q<e.length;q++){var c=this.graph.getCellGeometry(e[q]);null!=c&&(d+=c.width*n/k,u.push(Math.round(d)))}return u};
+TableLayout.prototype.layoutRow=function(a,b,e,d){var k=this.graph.getModel(),n=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var u=a.x,q=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var c=0;c<n.length;c++){var f=this.graph.getCellGeometry(n[c]);null!=f&&(f=f.clone(),f.y=a.y,f.height=e-a.y-a.height,null!=b?(f.x=b[c],f.width=b[c+1]-f.x,c==n.length-1&&c<b.length-2&&(f.width=d-f.x-a.x-a.width)):(f.x=u,u+=f.width,c==n.length-1?f.width=d-a.x-a.width-q:q+=f.width),k.setGeometry(n[c],f))}return q};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),n="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),u=this.graph.getModel(),q=0;u.beginUpdate();try{var c=e.height-b.y-b.height,f=e.width-b.x-b.width,g=u.getChildCells(a,!0),l=this.getSize(g,!1);if(0<c&&0<f&&0<g.length&&0<l){if(k){var m=this.graph.getCellGeometry(g[g.length-
+1]);null!=m&&(m=m.clone(),m.height=c-l+m.height,u.setGeometry(g[g.length-1],m))}for(var t=n?null:this.getRowLayout(g[0],f),p=b.y,x=0;x<g.length;x++)m=this.graph.getCellGeometry(g[x]),null!=m&&(m=m.clone(),m.x=b.x,m.width=f,m.y=Math.round(p),p=k||d?p+m.height:p+m.height/l*c,m.height=Math.round(p)-m.y,u.setGeometry(g[x],m)),q=Math.max(q,this.layoutRow(g[x],t,m.height,f));d&&c<l&&(e=e.clone(),e.height=p+b.height,u.setGeometry(a,e));n&&f<q+Graph.minTableColumnWidth&&(e=e.clone(),e.width=q+b.width+b.x+
+Graph.minTableColumnWidth,u.setGeometry(a,e))}}finally{u.endUpdate()}}};
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,f){f=null!=f?f:!0;var c=this.getState(a);null!=c&&f&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
+arguments);null!=c&&f&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
+1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},t=.5*this.scale,b=!1,d=[],p=0;p<c.length-1;p++){for(var x=
+c[p+1],k=c[p],n=[],q=c[p+2];p<c.length-2&&mxUtils.ptSegDistSq(k.x,k.y,q.x,q.y,x.x,x.y)<1*this.scale*this.scale;)x=q,p++,q=c[p+2];for(var b=e(0,k.x,k.y)||b,u=0;u<this.validEdges.length;u++){var y=this.validEdges[u],B=y.absolutePoints;if(null!=B&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<B.length-1;y++){for(var E=B[y+1],F=B[y],q=B[y+2];y<B.length-2&&mxUtils.ptSegDistSq(F.x,F.y,q.x,q.y,E.x,E.y)<1*this.scale*this.scale;)E=q,y++,q=B[y+2];q=mxUtils.intersection(k.x,k.y,x.x,x.y,F.x,F.y,E.x,
+E.y);if(null!=q&&(Math.abs(q.x-k.x)>t||Math.abs(q.y-k.y)>t)&&(Math.abs(q.x-x.x)>t||Math.abs(q.y-x.y)>t)&&(Math.abs(q.x-F.x)>t||Math.abs(q.y-F.y)>t)&&(Math.abs(q.x-E.x)>t||Math.abs(q.y-E.y)>t)){E=q.x-k.x;F=q.y-k.y;q={distSq:E*E+F*F,x:q.x,y:q.y};for(E=0;E<n.length;E++)if(n[E].distSq>q.distSq){n.splice(E,0,q);q=null;break}null==q||0!=n.length&&n[n.length-1].x===q.x&&n[n.length-1].y===q.y||n.push(q)}}}for(y=0;y<n.length;y++)b=e(1,n[y].x,n[y].y)||b}q=c[c.length-1];b=e(0,q.x,q.y)||b}a.routedPoints=d;return b}return!1};
+var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
+"jumpStyle","none"),g=!0,x=null,n=null,q=[],u=null;a.begin();for(var I=0;I<this.state.routedPoints.length;I++){var y=this.state.routedPoints[I],B=new mxPoint(y.x/this.scale,y.y/this.scale);0==I?B=b[0]:I==this.state.routedPoints.length-1&&(B=b[b.length-1]);var E=!1;if(null!=x&&1==y.type){var F=this.state.routedPoints[I+1],y=F.x/this.scale-B.x,F=F.y/this.scale-B.y,y=y*y+F*F;null==u&&(u=new mxPoint(B.x-x.x,B.y-x.y),n=Math.sqrt(u.x*u.x+u.y*u.y),0<n?(u.x=u.x*f/n,u.y=u.y*f/n):u=null);y>f*f&&0<n&&(y=x.x-
+B.x,F=x.y-B.y,y=y*y+F*F,y>f*f&&(E=new mxPoint(B.x-u.x,B.y-u.y),y=new mxPoint(B.x+u.x,B.y+u.y),q.push(E),this.addPoints(a,q,d,c,!1,null,g),q=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,g=!1,"sharp"==e?(a.lineTo(E.x-u.y*q,E.y+u.x*q),a.lineTo(y.x-u.y*q,y.y+u.x*q),a.lineTo(y.x,y.y)):"arc"==e?(q*=1.3,a.curveTo(E.x-u.y*q,E.y+u.x*q,y.x-u.y*q,y.y+u.x*q,y.x,y.y)):(a.moveTo(y.x,y.y),g=!0),q=[y],E=!0))}else u=null;E||(q.push(B),x=B)}this.addPoints(a,q,d,c,!1,null,g);a.stroke()}};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)n.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var k=Math.cos(-g),q=Math.sin(-g),c=mxUtils.getRotatedPoint(c,k,q,l);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);k+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);c=this.getPerimeterPoint(b,c,0==g&&f,k);0!=g&&(k=Math.cos(g),q=Math.sin(g),c=mxUtils.getRotatedPoint(c,k,q,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,m){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;if(null!=a)for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,
+a[c]);if(null!=f){var g=(f.x-m.x)*(f.x-m.x)+(f.y-m.y)*(f.y-m.y);if(null==e||g<e)d=f,e=g}}null!=d&&(m=d)}return m};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=u.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(Graph.decompress(b));return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var k=b[d];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var n=
+mxUtils.load(k);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(u){null!=window.console&&console.log("error in getStencil:",k,u)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,l=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",a,t)}null!=k&&null!=
-k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(d));if(null!=b){var t=d.getAttribute("w"),
-c=d.getAttribute("h"),t=null==t?80:parseInt(t,10),c=null==c?80:parseInt(c,10);b(k,l,a,t,c)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var n=!1;if(null==k)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,n=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,n))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;n=!0}catch(u){null!=window.console&&console.log("error in loadStencilSet:",a,u)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,n)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var k=k.toLowerCase(),n=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+n.toLowerCase(),new mxStencil(d));if(null!=b){var u=d.getAttribute("w"),
+q=d.getAttribute("h"),u=null==u?80:parseInt(u,10),q=null==q?80:parseInt(q,10);b(k,n,a,u,q)}}d=d.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
"#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return e.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var d=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||d.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=
function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];
-return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var l=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=l.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var f=c.apply(this,arguments);this.error=
-null;return f});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),f=
-0;f<c.length;f++)null!=this.currentEdgeStyle[c[f]]&&(a+=c[f]+"="+this.currentEdgeStyle[c[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
-";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,f){this.model.beginUpdate();try{for(var b=0;b<f.length;b++)if(this.model.isVertex(f[b])||this.model.isEdge(f[b])){this.setCellStyles(a,null,[f[b]]);var d=this.getCellStyle(f[b])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
-c,[f[b]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var f=0;f<a.length;f++){var b=a[f];c[mxObjectIdentity.get(b)]=
-b.getId();for(var d=this.model.getChildCount(b),e=0;e<d;e++)this.createCellLookup([this.model.getChildAt(b,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,f){f=null!=f?f:{};for(var b in a){var d=c[b];null==f[d]&&(f[d]=a[b].getId()||"")}return f};Graph.prototype.importGraphModel=function(a,c,f,b){c=null!=c?c:0;f=null!=f?f:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];var d={},g={},u=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),d));if(null!=
-u){var m=this.createCellLookup([e.root]),u=u.slice();this.model.beginUpdate();try{if(1!=u.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<u.length;e++){var p=this.model.getChildren(this.moveCells([u[e]],c,f,!1,this.model.getRoot())[0]);null!=p&&(a=a.concat(p))}else a=this.moveCells(e.getChildren(u[0]),c,f,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,m,g),this.updateCustomLinks(g,a),b)){this.isGridEnabled()&&
-(c=this.snap(c),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(a,!0);null!=n&&this.moveCells(a,c-n.x,f-n.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},f=this.cloneCells(a,null,c),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(var e=new mxCodec,g=new mxGraphModel,u=g.getChildAt(g.getRoot(),0),d=0;d<f.length;d++){g.add(u,f[d]);var m=this.view.getState(a[d]);if(null!=m){var p=this.getCellGeometry(f[d]);null!=p&&p.relative&&!this.model.isEdge(a[d])&&
-null==b.get(this.model.getParent(a[d]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),f);return e.encode(g)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var f=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var t=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(a){var c=this.model.getParent(a);if(null!=c){var f=this.getCurrentCellStyle(c);if(null!=f.expand)return"0"!=f.expand}return t.apply(this,arguments)&&(null==c||!this.isTable(c))};var c=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,f,b,d,e,g,u,m){null==m&&(m=this.model.getParent(a),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(g,u,null,!0,!1));c.apply(this,[a,f,b,d,e,g,u,m])};var f=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(a,c,b){if(c||b)f.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,g=[],u=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(g.push(c),c==d)e=g.length-1;else if(a&&null==d&&0<g.length||null!=e&&a&&g.length>e||!a&&0<e)return;for(var f=0;f<this.model.getChildCount(c);f++)u(this.model.getChildAt(c,f))});u(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var g=Graph.prototype.moveCells;
-Graph.prototype.moveCells=function(a,c,f,b,d,e,u){u=null!=u?u:{};if(this.isTable(d)){for(var m=[],p=0;p<a.length;p++)this.isTable(a[p])?m=m.concat(this.model.getChildCells(a[p],!0).reverse()):m.push(a[p]);a=m}this.model.beginUpdate();try{m=[];for(p=0;p<a.length;p++)if(null!=d&&this.isTableRow(a[p])){var n=this.model.getParent(a[p]),q=this.getCellGeometry(a[p]);this.isTable(n)&&m.push(n);if(null!=n&&null!=q&&this.isTable(n)&&this.isTable(d)&&(b||n!=d)){if(!b){var Q=this.getCellGeometry(n);null!=Q&&
-(Q=Q.clone(),Q.height-=q.height,this.model.setGeometry(n,Q))}Q=this.getCellGeometry(d);null!=Q&&(Q=Q.clone(),Q.height+=q.height,this.model.setGeometry(d,Q));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=b?this.cloneCell(a[p]):a[p],v=this.model.getChildCells(k,!0),l=this.model.getChildCells(B[0],!0),x=l.length-v.length;if(0<x)for(var J=0;J<x;J++){var y=this.cloneCell(v[v.length-1]);null!=y&&(y.value="",this.model.add(k,y))}else if(0>x)for(J=0;J>x;J--)this.model.remove(v[v.length+J-1]);
-v=this.model.getChildCells(k,!0);for(J=0;J<l.length;J++){var P=this.getCellGeometry(l[J]),ba=this.getCellGeometry(v[J]);null!=P&&null!=ba&&(ba=ba.clone(),ba.width=P.width,this.model.setGeometry(v[J],ba))}}}}for(var H=g.apply(this,arguments),p=0;p<m.length;p++)!b&&this.model.contains(m[p])&&0==this.model.getChildCount(m[p])&&this.model.remove(m[p]);b&&this.updateCustomLinks(this.createCellMapping(u,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var m=Graph.prototype.removeCells;
-Graph.prototype.removeCells=function(a,c){var f=[];this.model.beginUpdate();try{for(var b=0;b<a.length;b++)if(this.isTableCell(a[b])){var d=this.model.getParent(a[b]),e=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(e)?0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(f,e)&&f.push(e):this.labelChanged(a[b],"")}else{if(this.isTableRow(a[b])&&(e=this.model.getParent(a[b]),0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(f,e))){for(var g=this.model.getChildCells(e,!0),u=0,p=0;p<
-g.length;p++)0<=mxUtils.indexOf(a,g[p])&&u++;u==g.length&&f.push(e)}f.push(a[b])}f=m.apply(this,[f,c])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(a,c){for(var f=0;f<c.length;f++)null!=c[f]&&this.updateCustomLinksForCell(a,c[f])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var f=mxUtils.getValue(a.style,"points",null);if(null!=f){var b=[];try{for(var d=JSON.parse(f),f=0;f<d.length;f++){var e=
-d[f];b.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(Ba){}return b}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;f=a.shape.scale;b=d.width/f;d=d.height/f;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=b,b=d,d=e;f=a.shape.getConstraints(a.style,b,d);if(null!=f)return f;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=
-a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),f=0,b=0;b<c;b++){var d=this.model.getChildAt(a,b);this.model.isVertex(d)&&
-(d=this.getCellGeometry(d),null==d||d.relative||f++)}return 0<f||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,f){for(var b=this.getCurrentCellStyle(a),d=!0,e=!0,g=0;g<c.length&&e;g++)d=d&&this.isTable(c[g]),e=e&&this.isTableRow(c[g]);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||e||d)};Graph.prototype.createGroupCell=
-function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var f=this.getModel(),b=[];f.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(f.isEdge(e)){var g=f.getTerminal(e,!0),u=f.getTerminal(e,!1);f.setTerminal(e,u,!0);f.setTerminal(e,g,!1);var m=f.getGeometry(e);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);
-m.setTerminalPoint(p,!1);m.setTerminalPoint(n,!0);f.setGeometry(e,m);var q=this.view.getState(e),B=this.view.getState(g),v=this.view.getState(u);if(null!=q){var k=null!=B?this.getConnectionConstraint(q,B,!0):null,Q=null!=v?this.getConnectionConstraint(q,v,!1):null;this.setConnectionConstraint(e,g,!0,Q);this.setConnectionConstraint(e,u,!1,k)}b.push(e)}}else if(f.isVertex(e)&&(m=this.getCellGeometry(e),null!=m)){if(!this.isTable(e)&&!this.isTableRow(e)&&!this.isTableCell(e)){m=m.clone();m.x+=m.width/
-2-m.height/2;m.y+=m.height/2-m.width/2;var l=m.width;m.width=m.height;m.height=l;f.setGeometry(e,m)}var x=this.view.getState(e);if(null!=x){var J=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],y=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,J[mxUtils.mod(mxUtils.indexOf(J,y)+(c?-1:1),J.length)],[e])}b.push(e)}}}finally{f.endUpdate()}return b};Graph.prototype.stencilHasPlaceholders=
-function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var p=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
-(c=this.model.getParent(c));var f=this.view.getState(c);null!=f&&null!=f.shape&&(this.view.invalidate(c),f.shape.bounds=null)}p.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var f=this.view.getState(a[c]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
-this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var f=a.ownerDocument.createElement(null!=c?c:"span"),b=Array.prototype.slice.call(a.attributes);attr=b.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=a.innerHTML;a.parentNode.replaceChild(f,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var f=a.getElementsByTagName("*"),b=
-0;b<f.length;b++)c(f[b])};Graph.prototype.updateLabelElements=function(a,c,f){a=null!=a?a:this.getSelectionCells();for(var b=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){b.innerHTML=e;for(var g=b.getElementsByTagName(null!=f?f:"*"),u=0;u<g.length;u++)c(g[u]);b.innerHTML!=e&&this.cellLabelChanged(a[d],b.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,f){c=Graph.zapGremlins(c);this.model.beginUpdate();
-try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(b)){this.setAttributeForCell(d,b,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=
-function(a){if(null!=a){for(var c=new mxDictionary,f=0;f<a.length;f++)c.put(a[f],!0);for(var b=[],f=0;f<a.length;f++){var d=this.model.getParent(a[f]);null==d||c.get(d)||(c.put(d,!0),b.push(d))}for(f=0;f<b.length;f++)if(d=this.view.getState(b[f]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var e=!0,g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],f=0;f<a.length;f++)this.isCellDeletable(a[f])&&this.isTransparentState(this.view.getState(a[f]))&&c.push(a[f]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,f){a=null!=a.value&&"object"===
-typeof a.value?a.value.getAttribute(c):null;return null!=a?a:f};Graph.prototype.setAttributeForCell=function(a,c,f){var b;null!=a.value&&"object"==typeof a.value?b=a.value.cloneNode(!0):(b=mxUtils.createXmlDocument().createElement("UserObject"),b.setAttribute("label",a.value||""));null!=f?b.setAttribute(c,f):b.removeAttribute(c);this.model.setValue(a,b)};var n=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,f,b){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=
-0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;for(var e=n.apply(this,arguments),g=!0,d=0;d<a.length&&g;d++)g=g&&this.isTableRow(a[d]);g&&(this.isTableCell(e)&&(e=this.model.getParent(e)),this.isTableRow(e)&&(e=this.model.getParent(e)),this.isTable(e)||(e=null));return e};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&
-(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var b=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=b||this.firstClickSource!=d||null!=b&&null!=b.text&&null!=b.text.node&&null!=b.text.boundingBox&&(mxUtils.contains(b.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(b.text.node,
-mxEvent.getSource(a)))||(null!=b||this.isCellLocked(this.getDefaultParent()))&&(null==b||this.isCellLocked(b.cell))||!(null!=b||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(null==b&&(b=this.view.getState(this.getCellAt(f.x,f.y))),c=this.addText(f.x,f.y,b))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-
-this.view.translate.y;if(this.pageVisible)var b=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,b.x*d.width),f=Math.max(f,b.y*d.height);return new mxPoint(this.snap(c+a),this.snap(f+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),f=this.getInsertPoint(),b=this.snap(Math.round(Math.max(f.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(f.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(b,
+return a};var k=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=k.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var n=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=n.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=
+null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",c="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),b=
+0;b<c.length;b++)null!=this.currentEdgeStyle[c[b]]&&(a+=c[b]+"="+this.currentEdgeStyle[c[b]]+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.updateCellStyles=function(a,c,b){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)if(this.model.isVertex(b[f])||this.model.isEdge(b[f])){this.setCellStyles(a,null,[b[f]]);var d=this.getCellStyle(b[f])[a];c!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,
+c,[b[f]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var f=a[b];c[mxObjectIdentity.get(f)]=
+f.getId();for(var d=this.model.getChildCount(f),e=0;e<d;e++)this.createCellLookup([this.model.getChildAt(f,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,b){b=null!=b?b:{};for(var f in a){var d=c[f];null==b[d]&&(b[d]=a[f].getId()||"")}return b};Graph.prototype.importGraphModel=function(a,c,b,f){c=null!=c?c:0;b=null!=b?b:0;var d=new mxCodec(a.ownerDocument),e=new mxGraphModel;d.decode(a,e);a=[];var d={},g={},m=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),d));if(null!=
+m){var l=this.createCellLookup([e.root]),m=m.slice();this.model.beginUpdate();try{if(1!=m.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<m.length;e++){var v=this.model.getChildren(this.moveCells([m[e]],c,b,!1,this.model.getRoot())[0]);null!=v&&(a=a.concat(v))}else a=this.moveCells(e.getChildren(m[0]),c,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),f)){this.isGridEnabled()&&
+(c=this.snap(c),b=this.snap(b));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,c-p.x,b-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},b=this.cloneCells(a,null,c),f=new mxDictionary,d=0;d<a.length;d++)f.put(a[d],!0);for(var e=new mxCodec,g=new mxGraphModel,m=g.getChildAt(g.getRoot(),0),d=0;d<b.length;d++){g.add(m,b[d]);var l=this.view.getState(a[d]);if(null!=l){var v=this.getCellGeometry(b[d]);null!=v&&v.relative&&!this.model.isEdge(a[d])&&
+null==f.get(this.model.getParent(a[d]))&&(v.offset=null,v.relative=!1,v.x=l.x/l.view.scale-l.view.translate.x,v.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),b);return e.encode(g)};Graph.prototype.isSwimlane=function(a,c){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var b=this.getCurrentCellStyle(a,c)[mxConstants.STYLE_SHAPE];return b==mxConstants.SHAPE_SWIMLANE||"table"==b}return!1};var u=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(a){var c=this.model.getParent(a);if(null!=c){var b=this.getCurrentCellStyle(c);if(null!=b.expand)return"0"!=b.expand}return u.apply(this,arguments)&&(null==c||!this.isTable(c))};var q=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,c,b,f,d,e,g,m){null==m&&(m=this.model.getParent(a),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(e,g,null,!0,!1));q.apply(this,[a,c,b,f,d,e,g,m])};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(a,b,f){if(b||f)c.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,g=[],m=mxUtils.bind(this,function(c){if(null!=this.view.getState(c)&&(this.model.isVertex(c)||this.model.isEdge(c)))if(g.push(c),c==d)e=g.length-1;else if(a&&null==d&&0<g.length||null!=e&&a&&g.length>e||!a&&0<e)return;for(var b=0;b<this.model.getChildCount(c);b++)m(this.model.getChildAt(c,b))});m(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var f=Graph.prototype.moveCells;
+Graph.prototype.moveCells=function(a,c,b,d,e,g,m){m=null!=m?m:{};if(this.isTable(e)){for(var l=[],v=0;v<a.length;v++)this.isTable(a[v])?l=l.concat(this.model.getChildCells(a[v],!0).reverse()):l.push(a[v]);a=l}this.model.beginUpdate();try{l=[];for(v=0;v<a.length;v++)if(null!=e&&this.isTableRow(a[v])){var p=this.model.getParent(a[v]),t=this.getCellGeometry(a[v]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(e)&&(d||p!=e)){if(!d){var x=this.getCellGeometry(p);null!=x&&
+(x=x.clone(),x.height-=t.height,this.model.setGeometry(p,x))}x=this.getCellGeometry(e);null!=x&&(x=x.clone(),x.height+=t.height,this.model.setGeometry(e,x));var A=this.model.getChildCells(e,!0);if(0<A.length){var P=d?this.cloneCell(a[v]):a[v],k=this.model.getChildCells(P,!0),K=this.model.getChildCells(A[0],!0),n=K.length-k.length;if(0<n)for(var q=0;q<n;q++){var z=this.cloneCell(k[k.length-1]);null!=z&&(z.value="",this.model.add(P,z))}else if(0>n)for(q=0;q>n;q--)this.model.remove(k[k.length+q-1]);
+k=this.model.getChildCells(P,!0);for(q=0;q<K.length;q++){var T=this.getCellGeometry(K[q]),y=this.getCellGeometry(k[q]);null!=T&&null!=y&&(y=y.clone(),y.width=T.width,this.model.setGeometry(k[q],y))}}}}for(var ia=f.apply(this,arguments),v=0;v<l.length;v++)!d&&this.model.contains(l[v])&&0==this.model.getChildCount(l[v])&&this.model.remove(l[v]);d&&this.updateCustomLinks(this.createCellMapping(m,this.createCellLookup(a)),ia)}finally{this.model.endUpdate()}return ia};var g=Graph.prototype.removeCells;
+Graph.prototype.removeCells=function(a,c){var b=[];this.model.beginUpdate();try{for(var f=0;f<a.length;f++)if(this.isTableCell(a[f])){var d=this.model.getParent(a[f]),e=this.model.getParent(d);1==this.model.getChildCount(d)&&1==this.model.getChildCount(e)?0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(b,e)&&b.push(e):this.labelChanged(a[f],"")}else{if(this.isTableRow(a[f])&&(e=this.model.getParent(a[f]),0>mxUtils.indexOf(a,e)&&0>mxUtils.indexOf(b,e))){for(var m=this.model.getChildCells(e,!0),l=0,v=0;v<
+m.length;v++)0<=mxUtils.indexOf(a,m[v])&&l++;l==m.length&&b.push(e)}b.push(a[f])}b=g.apply(this,[b,c])}finally{this.model.endUpdate()}return b};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=JSON.parse(b),b=0;b<d.length;b++){var e=
+d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(Da){}return f}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;d=a.shape.bounds;b=a.shape.scale;f=d.width/b;d=d.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=f,f=d,d=e;b=a.shape.getConstraints(a.style,f,d);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=
+a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&
+(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,c,b){for(var f=this.getCurrentCellStyle(a),d=!0,e=!0,g=0;g<c.length&&e;g++)d=d&&this.isTable(c[g]),e=e&&this.isTableRow(c[g]);return("1"!=mxUtils.getValue(f,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(f,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||e||d)};Graph.prototype.createGroupCell=
+function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var b=this.getModel(),f=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var g=b.getTerminal(e,!0),m=b.getTerminal(e,!1);b.setTerminal(e,m,!0);b.setTerminal(e,g,!1);var l=b.getGeometry(e);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var v=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);
+l.setTerminalPoint(v,!1);l.setTerminalPoint(p,!0);b.setGeometry(e,l);var t=this.view.getState(e),x=this.view.getState(g),A=this.view.getState(m);if(null!=t){var k=null!=x?this.getConnectionConstraint(t,x,!0):null,P=null!=A?this.getConnectionConstraint(t,A,!1):null;this.setConnectionConstraint(e,g,!0,P);this.setConnectionConstraint(e,m,!1,k)}f.push(e)}}else if(b.isVertex(e)&&(l=this.getCellGeometry(e),null!=l)){if(!this.isTable(e)&&!this.isTableRow(e)&&!this.isTableCell(e)){l=l.clone();l.x+=l.width/
+2-l.height/2;l.y+=l.height/2-l.width/2;var K=l.width;l.width=l.height;l.height=K;b.setGeometry(e,l)}var n=this.view.getState(e);if(null!=n){var q=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],z=mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,q[mxUtils.mod(mxUtils.indexOf(q,z)+(c?-1:1),q.length)],[e])}f.push(e)}}}finally{b.endUpdate()}return f};Graph.prototype.stencilHasPlaceholders=
+function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var l=Graph.prototype.processChange;Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var c=a.cell;this.isTableCell(c)&&(c=this.model.getParent(c));this.isTableRow(c)&&
+(c=this.model.getParent(c));var b=this.view.getState(c);null!=b&&null!=b.shape&&(this.view.invalidate(c),b.shape.bounds=null)}l.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var b=this.view.getState(a[c]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&
+this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),f=Array.prototype.slice.call(a.attributes);attr=f.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){if(null!=a)for(var b=a.getElementsByTagName("*"),f=
+0;f<b.length;f++)c(b[f])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var f=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var e=this.convertValueToString(a[d]);if(null!=e&&0<e.length){f.innerHTML=e;for(var g=f.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)c(g[l]);f.innerHTML!=e&&this.cellLabelChanged(a[d],f.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=Graph.zapGremlins(c);this.model.beginUpdate();
+try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=
+function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var f=[],b=0;b<a.length;b++){var d=this.model.getParent(a[b]);null==d||c.get(d)||(c.put(d,!0),f.push(d))}for(b=0;b<f.length;b++)if(d=this.view.getState(f[b]),null!=d&&(this.model.isEdge(d.cell)||this.model.isVertex(d.cell))&&this.isCellDeletable(d.cell)&&this.isTransparentState(d)){for(var e=!0,g=0;g<this.model.getChildCount(d.cell)&&e;g++)c.get(this.model.getChildAt(d.cell,g))||(e=!1);e&&a.push(d.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&this.isTransparentState(this.view.getState(a[b]))&&c.push(a[b]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=function(a,c,b){a=null!=a.value&&"object"===
+typeof a.value?a.value.getAttribute(c):null;return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,c,b){var f;null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};var m=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=
+0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;for(var e=m.apply(this,arguments),g=!0,d=0;d<a.length&&g;d++)g=g&&this.isTableRow(a[d]);g&&(this.isTableCell(e)&&(e=this.model.getParent(e)),this.isTableRow(e)&&(e=this.model.getParent(e)),this.isTable(e)||(e=null));return e};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){this.isEnabled()&&
+(c=this.insertTextForEvent(a,c),mxGraph.prototype.dblClick.call(this,a,c))};Graph.prototype.insertTextForEvent=function(a,c){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&null!=f.text.boundingBox&&(mxUtils.contains(f.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(f.text.node,
+mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(null==f&&(f=this.view.getState(this.getCellAt(b.x,b.y))),c=this.addText(b.x,b.y,f))}return c};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-
+this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(f,
a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a: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-a.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/
-2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,f){var b=new mxCell;b.value="Text";b.geometry=new mxGeometry(0,0,0,0);b.vertex=!0;if(null!=f&&this.model.isEdge(f.cell)){b.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";b.geometry.relative=!0;b.connectable=!1;var d=this.view.getRelativePoint(f,a,c);b.geometry.x=Math.round(1E4*
-d.x)/1E4;b.geometry.y=Math.round(d.y);b.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(f,b.geometry),e=this.view.scale;b.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else d=this.view.translate,b.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",b.geometry.width=40,b.geometry.height=20,b.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=f?f.origin.x:0),b.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=f?f.origin.y:0),b.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([b],null!=f?f.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[b])),this.autoSizeCell(b)}finally{this.getModel().endUpdate()}return b};Graph.prototype.addClickHandler=function(a,c,f){var b=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++){var b=this.getAbsoluteUrl(a[f].getAttribute("href"));null!=b&&(a[f].setAttribute("rel",this.linkRelation),a[f].setAttribute("href",
-b),null!=c&&mxEvent.addGestureListeners(a[f],null,null,c))}});this.model.addListener(mxEvent.CHANGE,b);b();var d=this.container.style.cursor,e=this.getTolerance(),g=this,u={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,f){return null==
+2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){f.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*
+d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else d=this.view.translate,f.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x-(null!=b?b.origin.x:0),f.geometry.y=Math.round(c/this.view.scale)-d.y-(null!=b?b.origin.y:0),f.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",
+f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,f);f();var d=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==
g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=
-this.currentLink){var f=Math.abs(this.startX-c.getGraphX()),b=Math.abs(this.startY-c.getGraphY());(f>e||b>e)&&this.clear()}}else{for(f=c.getSource();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},
-mouseUp:function(a,b){for(var d=b.getSource(),u=b.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==b.sourceState||!b.isSource(b.sourceState.control))&&((mxEvent.isLeftMouseButton(u)||mxEvent.isMiddleMouseButton(u))&&!mxEvent.isPopupTrigger(u)||mxEvent.isTouchEvent(u))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,
-5)&&d||null==c||c(u,this.currentLink),mxEvent.isConsumed(u)||(u=mxEvent.isMiddleMouseButton(u)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,u),b.consume())):null!=f&&!b.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-b.getGraphX())<e&&Math.abs(this.startY-b.getGraphY())<e&&f(b.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&
-(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(u);mxEvent.addListener(document,"mouseleave",function(a){u.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var f=
-0;f<a.length;f++)this.isTableCell(a[f])&&(a[f]=this.model.getParent(a[f]));a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,e=[];b.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),f=0;f<a.length;f++){var u=b.getParent(a[f]),m=this.moveCells([g[f]],d,d,!1)[0];e.push(m);if(c)b.add(u,g[f]);else{var p=u.getIndex(a[f]);b.add(u,g[f],p+1)}if(this.isTable(u)){var n=this.getCellGeometry(g[f]),q=this.getCellGeometry(u);null!=n&&null!=q&&(q=q.clone(),q.height+=n.height,b.setGeometry(u,
-q))}}}finally{b.endUpdate()}return e};Graph.prototype.insertImage=function(a,c,f){if(null!=a&&null!=this.cellEditor.textarea){for(var b=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<b.length;e++)d.push(b[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",f);break}}};Graph.prototype.insertLink=function(a){if(null!=
-this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),f=[],b=0;b<c.length;b++)f.push(c[b]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==f.length+1)for(b=c.length-1;0<=b;b--)if(c[b]!=f[b-1]){for(c=c[b].getElementsByTagName("a");0<c.length;){for(f=c[0].parentNode;null!=c[0].firstChild;)f.insertBefore(c[0].firstChild,c[0]);
-f.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var f=[],b=null,
-d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var u=a?g.getCenterX():g.getCenterY(),b=null!=b?Math.max(b,u):u,d=null!=d?Math.min(d,u):u;f.push(g)}}if(2<f.length){f.sort(function(c,f){return a?c.x-f.x:c.y-f.y});g=this.view.translate;u=this.view.scale;d=d/u-(a?g.x:g.y);b=b/u-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(b-d)/(f.length-1),b=d,e=1;e<f.length-1;e++){var p=this.view.getState(this.model.getParent(f[e].cell)),n=this.getCellGeometry(f[e].cell),
-b=b+m;null!=n&&null!=p&&(n=n.clone(),a?n.x=Math.round(b-n.width/2)-p.origin.x:n.y=Math.round(b-n.height/2)-p.origin.y,this.getModel().setGeometry(f[e].cell,n))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=
-function(a,c,f,b,d,e,g,u,m,p){var n=this.useCssTransforms;n&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var q=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==q)throw Error(mxResources.get("drawingEmpty"));var B=this.view.scale,v=mxUtils.createXmlDocument(),k=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=
-k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==v.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var l=Math.max(1,Math.ceil(q.width*a)+2*f)+(p?5:0),x=Math.max(1,Math.ceil(q.height*a)+2*f)+(p?5:0);k.setAttribute("version","1.1");k.setAttribute("width",l+"px");k.setAttribute("height",x+"px");k.setAttribute("viewBox",
-(d?"-0.5 -0.5":"0 0")+" "+l+" "+x);v.appendChild(k);var J=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"g"):v.createElement("g");k.appendChild(J);var y=this.createSvgCanvas(J);y.foOffset=d?-.5:0;y.textOffset=d?-.5:0;y.imageOffset=d?-.5:0;y.translate(Math.floor((f/c-q.x)/B),Math.floor((f/c-q.y)/B));var P=document.createElement("div"),H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,u,m,p,n,q,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=
-e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),B=[],La=0,k=0;(0==Na||La<Na)&&k<e.length;){var v=e.charCodeAt(k);if(10==v||13==v){if(0<La)break}else B.push(e.charAt(k)),255>v&&La++;k++}B.length<e.length&&1<e.length-B.length&&(e=mxUtils.trim(B.join(""))+"...");return e}catch(Ya){return H.apply(this,arguments)}else return H.apply(this,arguments)};var Q=this.backgroundImage;if(null!=Q){c=B/c;var S=this.view.translate,A=new mxRectangle(S.x*c,S.y*c,Q.width*
-c,Q.height*c);mxUtils.intersects(q,A)&&y.image(S.x,S.y,Q.width,Q.height,Q.src,!0)}y.scale(a);y.textEnabled=g;u=null!=u?u:this.createSvgImageExport();var t=u.drawCellState,z=u.getLinkForCellState;u.getLinkForCellState=function(a,c){var f=z.apply(this,arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};u.drawCellState=function(a,c){for(var f=a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&t.apply(this,
-arguments)};u.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(y,k);return k}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform",
+this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},
+mouseUp:function(a,f){for(var d=f.getSource(),l=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==f.sourceState||!f.isSource(f.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(d=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,
+5)&&d||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":d?g.linkTarget:"_top",g.openLink(this.currentLink,l),f.consume())):null!=b&&!f.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&
+(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=d);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;for(var b=
+0;b<a.length;b++)this.isTableCell(a[b])&&(a[b]=this.model.getParent(a[b]));a=this.model.getTopmostCells(a);var f=this.getModel(),d=this.gridSize,e=[];f.beginUpdate();try{for(var g=this.cloneCells(a,!1,null,!0),b=0;b<a.length;b++){var l=f.getParent(a[b]),m=this.moveCells([g[b]],d,d,!1)[0];e.push(m);if(c)f.add(l,g[b]);else{var v=l.getIndex(a[b]);f.add(l,g[b],v+1)}if(this.isTable(l)){var p=this.getCellGeometry(g[b]),t=this.getCellGeometry(l);null!=p&&null!=t&&(t=t.clone(),t.height+=p.height,f.setGeometry(l,
+t))}}}finally{f.endUpdate()}return e};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=
+this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],f=0;f<c.length;f++)b.push(c[f]);document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(f=c.length-1;0<=f;f--)if(c[f]!=b[f-1]){for(c=c[f].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);
+b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,
+d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),f=null!=f?Math.max(f,l):l,d=null!=d?Math.min(d,l):l;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);f=f/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),
+f=f+m;null!=p&&null!=v&&(p=p.clone(),a?p.x=Math.round(f-p.width/2)-v.origin.x:p.y=Math.round(f-p.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=
+function(a,c,b,f,d,e,g,l,m,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,A=mxUtils.createXmlDocument(),k=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"svg"):A.createElement("svg");null!=a&&(null!=
+k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==A.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var K=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),n=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);k.setAttribute("version","1.1");k.setAttribute("width",K+"px");k.setAttribute("height",n+"px");k.setAttribute("viewBox",
+(d?"-0.5 -0.5":"0 0")+" "+K+" "+n);A.appendChild(k);var q=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"g"):A.createElement("g");k.appendChild(q);var z=this.createSvgCanvas(q);z.foOffset=d?-.5:0;z.textOffset=d?-.5:0;z.imageOffset=d?-.5:0;z.translate(Math.floor((b/c-t.x)/x),Math.floor((b/c-t.y)/x));var y=document.createElement("div"),T=z.getAlternateText;z.getAlternateText=function(a,c,b,f,d,e,g,l,m,v,p,t,X){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(y.innerHTML=
+e,e=mxUtils.extractTextWithWhitespace(y.childNodes));for(var Na=Math.ceil(2*f/this.state.fontSize),x=[],A=0,k=0;(0==Na||A<Na)&&k<e.length;){var K=e.charCodeAt(k);if(10==K||13==K){if(0<A)break}else x.push(e.charAt(k)),255>K&&A++;k++}x.length<e.length&&1<e.length-x.length&&(e=mxUtils.trim(x.join(""))+"...");return e}catch(Xa){return T.apply(this,arguments)}else return T.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){c=x/c;var O=this.view.translate,N=new mxRectangle(O.x*c,O.y*c,P.width*
+c,P.height*c);mxUtils.intersects(t,N)&&z.image(O.x,O.y,P.width,P.height,P.src,!0)}z.scale(a);z.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var C=l.drawCellState,u=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var b=u.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,c){for(var b=a.view.graph,f=b.isCellSelected(a.cell),d=b.model.getParent(a.cell);!e&&!f&&null!=d;)f=b.isCellSelected(d),d=b.model.getParent(d);(e||f)&&C.apply(this,
+arguments)};l.drawState(this.getView().getState(this.model.root),z);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(z,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),f=a.createElement("g");f.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform",
"translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,
-Graph.foreignObjectWarningText);f.appendChild(b);d.appendChild(e);f.appendChild(d);c.appendChild(f)}};Graph.prototype.updateSvgLinks=function(a,c,f){a=a.getElementsByTagName("a");for(var b=0;b<a.length;b++){var d=a[b].getAttribute("href");null==d&&(d=a[b].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[b].setAttribute("target",c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=
-!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,f){for(;null!=a&&a.nodeName!=c;){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,f){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==
-f)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var f=document.createRange();f.selectNode(a);c.removeAllRanges();c.addRange(f)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.deleteCells=function(a,c){var f=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=
-0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var e=this.getCellGeometry(a[b]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var u=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=u)for(f=[],b=0;b<u.length;b++)this.model.contains(u[b])&&(this.model.isVertex(u[b])||this.model.isEdge(u[b]))&&f.push(u[b])}return f};Graph.prototype.insertTableColumn=
-function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=mxUtils.indexOf(f.getChildCells(e,!0),a);else this.isTableRow(a)?b=f.getParent(a):a=f.getChildCells(b,!0)[0],c||(d=f.getChildCells(a,!0).length-1);for(var g=f.getChildCells(b,!0),u=Graph.minTableColumnWidth,e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],p=f.cloneCell(m,!1),n=this.getCellGeometry(p);p.value=null;if(null!=n){var u=n.width,q=this.getCellGeometry(g[e]);
-null!=q&&(n.height=q.height)}f.add(g[e],p,d+(c?0:1))}var B=this.getCellGeometry(b);null!=B&&(B=B.clone(),B.width+=u,f.setGeometry(b,B))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=f.getParent(a);else var e=f.getChildCells(b,!0),d=e[c?0:e.length-1];var g=f.getChildCells(d,!0),u=b.getIndex(d),d=f.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);
-if(null!=m){for(e=0;e<g.length;e++){a=f.cloneCell(g[e],!1);d.insert(a);a.value=null;var p=this.getCellGeometry(a);null!=p&&(p.height=m.height)}f.add(b,d,u+(c?0:1));var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.height+=m.height,f.setGeometry(b,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(0==d.length)c.remove(f);
-else{this.isTableRow(b)||(b=d[0]);var e=c.getChildCells(b,!0);if(1>=e.length)c.remove(f);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(b=a=0;b<d.length;b++){var u=c.getChildCells(d[b],!0)[g];c.remove(u);var m=this.getCellGeometry(u);null!=m&&(a=Math.max(a,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=a,c.setGeometry(f,p))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&
-(a=b=c.getParent(a));this.isTableRow(a)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(1>=d.length)c.remove(f);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var e=this.getCellGeometry(b);null!=e&&(a=e.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(f,g))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var f=a.tBodies[0],b=f.rows[0].cells,d=0,e=0;e<b.length;e++)var g=b[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);
-f=f.insertRow(c);for(e=0;e<d;e++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var f=a.tHead;if(null!=f)for(var b=0;b<f.rows.length;b++){var d=document.createElement("th");f.rows[b].appendChild(d);mxUtils.br(d)}f=a.tBodies[0];for(b=0;b<f.rows.length;b++)d=f.rows[b].insertCell(c),mxUtils.br(d);return f.rows[0].cells[0<=c?c:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
-c){if(0<=c)for(var f=a.tBodies[0].rows,b=0;b<f.length;b++)f[b].cells.length>c&&f[b].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var f=document.createElement("div");f.innerHTML=a;a=document.createDocumentFragment();for(var b;b=f.firstChild;)lastNode=a.appendChild(b);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
-function(a,c){function f(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var b=document.createElement("a");b.setAttribute("rel",this.linkRelation);b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",f(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&b.setAttribute("target",this.linkTarget);mxUtils.write(b,
-f(c,40));this.isCustomLink(a)&&mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&
-null==c.getState()){var f=this.getCellAt(c.graphX,c.graphY);null!=f&&this.isSwimlane(f)&&this.hitsSwimlaneContent(f,c.graphX,c.graphY)||(c.state=this.view.getState(f),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,f=!1,b=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),
-f=this.isSelectionEmpty(),b=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!b&&!mxEvent.isMouseEvent(d.getEvent())&&(f&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var f=null!=c&&mxEvent.isShiftDown(c);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var b=!0;this.graph.processElements(this.textarea,
-function(a){f||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):b=!1});b&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],f=0,b=a.rangeCount;f<b;++f)c.push(a.getRangeAt(f));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,f=a.length;c<f;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(pa){}};var v=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var q=mxConstraintHandler.prototype.update;
-mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?q.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){a=this.graph.getStartEditingCell(a,c);x.apply(this,arguments);var f=this.graph.view.getState(a);
-this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var f=this.graph.getModel().getParent(a),b=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(f)&&null!=b&&b.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?
-"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var y=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,f){f.originalNode=a;a=a.firstChild;for(var b=f.firstChild;null!=a&&null!=b;)c(a,b),a=a.nextSibling,b=b.nextSibling;return f}function f(a,c){if(null!=a)if(c.originalNode!=a)b(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?b(a):(f(a,c),c=c.nextSibling);
-a=d}}function b(a){for(var c=a.firstChild;null!=c;){var f=c.nextSibling;b(c);c=f}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}
-y.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var b=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?f(this.textarea,b):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
-function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),f=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
-c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,u=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.push("underline");
-(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&u.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration=u.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
+Graph.foreignObjectWarningText);b.appendChild(f);d.appendChild(e);b.appendChild(d);c.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");for(var f=0;f<a.length;f++){var d=a[f].getAttribute("href");null==d&&(d=a[f].getAttribute("xlink:href"));null!=d&&(null!=c&&/^https?:\/\//.test(d)?a[f].setAttribute("target",c):b&&this.isCustomLink(d)&&a[f].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=
+!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==
+b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.deleteCells=function(a,c){var b=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var f=
+0;f<a.length;f++){var d=this.model.getParent(a[f]);if(this.isTable(d)){var e=this.getCellGeometry(a[f]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=l)for(b=[],f=0;f<l.length;f++)this.model.contains(l[f])&&(this.model.isVertex(l[f])||this.model.isEdge(l[f]))&&b.push(l[f])}return b};Graph.prototype.insertTableColumn=
+function(a,c){var b=this.getModel();b.beginUpdate();try{var f=a,d=0;if(this.isTableCell(a))var e=b.getParent(a),f=b.getParent(e),d=mxUtils.indexOf(b.getChildCells(e,!0),a);else this.isTableRow(a)?f=b.getParent(a):a=b.getChildCells(f,!0)[0],c||(d=b.getChildCells(a,!0).length-1);for(var g=b.getChildCells(f,!0),l=Graph.minTableColumnWidth,e=0;e<g.length;e++){var m=b.getChildCells(g[e],!0)[d],v=b.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);
+null!=t&&(p.height=t.height)}b.add(g[e],v,d+(c?0:1))}var x=this.getCellGeometry(f);null!=x&&(x=x.clone(),x.width+=l,b.setGeometry(f,x))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var b=this.getModel();b.beginUpdate();try{var f=a,d=a;if(this.isTableCell(a))d=b.getParent(a),f=b.getParent(d);else if(this.isTableRow(a))f=b.getParent(a);else var e=b.getChildCells(f,!0),d=e[c?0:e.length-1];var g=b.getChildCells(d,!0),l=f.getIndex(d),d=b.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);
+if(null!=m){for(e=0;e<g.length;e++){a=b.cloneCell(g[e],!1);d.insert(a);a.value=null;var v=this.getCellGeometry(a);null!=v&&(v.height=m.height)}b.add(f,d,l+(c?0:1));var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.height+=m.height,b.setGeometry(f,p))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=this.getModel();c.beginUpdate();try{var b=a,f=a;this.isTableCell(a)&&(f=c.getParent(a));this.isTableRow(f)&&(b=c.getParent(f));var d=c.getChildCells(b,!0);if(0==d.length)c.remove(b);
+else{this.isTableRow(f)||(f=d[0]);var e=c.getChildCells(f,!0);if(1>=e.length)c.remove(b);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(f=a=0;f<d.length;f++){var l=c.getChildCells(d[f],!0)[g];c.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var v=this.getCellGeometry(b);null!=v&&(v=v.clone(),v.width-=a,c.setGeometry(b,v))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var b=a,f=a;this.isTableCell(a)&&
+(a=f=c.getParent(a));this.isTableRow(a)&&(b=c.getParent(f));var d=c.getChildCells(b,!0);if(1>=d.length)c.remove(b);else{this.isTableRow(f)||(f=d[d.length-1]);c.remove(f);a=0;var e=this.getCellGeometry(f);null!=e&&(a=e.height);var g=this.getCellGeometry(b);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(b,g))}}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=b.rows[0].cells,d=0,e=0;e<f.length;e++)var g=f[e].getAttribute("colspan"),d=d+(null!=g?parseInt(g):1);
+b=b.insertRow(c);for(e=0;e<d;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,
+c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=
+function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var f=document.createElement("a");f.setAttribute("rel",this.linkRelation);f.setAttribute("href",this.getAbsoluteUrl(a));f.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&f.setAttribute("target",this.linkTarget);mxUtils.write(f,
+b(c,40));this.isCustomLink(a)&&mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return f};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&
+null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),
+b=this.isSelectionEmpty(),f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var b=null!=c&&mxEvent.isShiftDown(c);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var f=!0;this.graph.processElements(this.textarea,
+function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):f=!1});f&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,f=a.rangeCount;b<f;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(sa){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));t.apply(this,arguments)};var p=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?p.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){a=this.graph.getStartEditingCell(a,c);x.apply(this,arguments);var b=this.graph.view.getState(a);
+this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?
+"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);
+a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}
+C.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?b(this.textarea,f):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){m=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<m.length&&"\n"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"<br/>"):m,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),
+c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");
+(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
d;this.textarea.style.padding="0px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var m=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(m=mxUtils.replaceTrailingNewlines(m,
-"<div><br></div>"));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var b=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
-mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=f;this.resize()}};var D=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=b.x*this.bounds.width;this.bounds.y+=b.y*this.bounds.height}this.textarea.style.width=
-Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",D.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
-function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var f=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));return f=this.graph.sanitizeHtml(f,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var E=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-c){this.graph.getModel().beginUpdate();try{E.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
+"<div><br></div>"));m=this.graph.sanitizeHtml(c?m.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):m,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=m&&(this.textarea.innerHTML=m);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,c){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
+!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(P){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+c){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(a,c){return mxGraphHandlerIsValidDropTarget.apply(this,
arguments)&&!mxEvent.isAltDown(c.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var f=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-f.x);f=this.roundLength((this.bounds.y+this.currentDy)/d-f.y);d=this.graph.view.unit;
-this.hint.innerHTML=b(c,d)+", "+b(f,d);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var A=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,c){A.apply(this,arguments);var f=this.graph.getCellStyle(a);
-if(null==f.childLayout){var b=this.graph.model.getParent(a),d=null!=b?this.graph.getCellGeometry(b):null;null!=d&&(f=this.graph.getCellStyle(b),"stackLayout"==f.childLayout&&(f="1"==mxUtils.getValue(f,"horizontalStack","1"),d=d.clone(),f?d.height=c.height:d.width=c.width,this.graph.model.setGeometry(b,d)))}};var C=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){f.get(a)||(f.put(a,!0),d.push(a))}for(var c=
-C.apply(this,arguments),f=new mxDictionary,b=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(b.getParent(b.getParent(g))):this.graph.isTableRow(g)&&a(b.getParent(g));a(g)}return d};var G=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=G.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+this.hint.innerHTML=b(c,d)+", "+b(f,d);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(a,c){y.apply(this,arguments);var b=this.graph.getCellStyle(a);
+if(null==b.childLayout){var f=this.graph.model.getParent(a),d=null!=f?this.graph.getCellGeometry(f):null;null!=d&&(b=this.graph.getCellStyle(f),"stackLayout"==b.childLayout&&(b="1"==mxUtils.getValue(b,"horizontalStack","1"),d=d.clone(),b?d.height=c.height:d.width=c.width,this.graph.model.setGeometry(f,d)))}};var B=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){b.get(a)||(b.put(a,!0),d.push(a))}for(var c=
+B.apply(this,arguments),b=new mxDictionary,f=this.graph.model,d=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(f.getParent(f.getParent(g))):this.graph.isTableRow(g)&&a(f.getParent(g));a(g)}return d};var E=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=E.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var F=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(a){var c=F.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var I=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return I.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 K=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return K.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)};var u=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||u.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var J=mxVertexHandler.prototype.getSelectionBorderBounds;
-mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,f=c.model,b=this.state,d=this.selectionBorder,e=this;null==a&&(a=[]);var g=c.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<g.length){for(var u=c.view.getCellStates(f.getChildCells(g[0].cell,
-!0)),f=0;f<u.length;f++)mxUtils.bind(this,function(f){var g=u[f],m=f<u.length-1?u[f+1]:null,p=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);p.isDashed=d.isDashed;p.svgStrokeTolerance++;p=new mxHandle(g,"col-resize",null,p);p.tableHandle=!0;var n=0;p.shape.node.parentNode.insertBefore(p.shape.node,p.shape.node.parentNode.firstChild);p.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(b.cell);this.shape.stroke=0==n?mxConstants.NONE:d.stroke;this.shape.bounds.x=
-this.state.x+this.state.width+n*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=b.y+(f==u.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=b.height-(f==u.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var q=!1;p.setPosition=function(a,f,b){n=Math.max(Graph.minTableColumnWidth-a.width,f.x-a.x-a.width);q=mxEvent.isShiftDown(b.getEvent());null==m||q||(n=Math.min((m.x+m.width-g.x-g.width)/c.view.scale-Graph.minTableColumnWidth,n))};p.execute=function(a){if(0!=
-n)c.setTableColumnWidth(this.state.cell,n,q);else if(!e.blockDelayedSelection){var f=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(f,a)}n=0};p.reset=function(){n=0};a.push(p)})(f);for(f=0;f<g.length;f++)mxUtils.bind(this,function(f){f=g[f];var u=new mxLine(new mxRectangle,mxConstants.NONE,1);u.isDashed=d.isDashed;u.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,u);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
-f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};f.setPosition=function(a,c,f){m=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};f.execute=function(a){if(0!=m)c.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));
-else if(!e.blockDelayedSelection){var f=c.getCellAt(a.getGraphX(),a.getGraphY())||b.cell;c.graphHandler.selectCellForEvent(f,a)}m=0};f.reset=function(){m=0};a.push(f)})(f)}}return null!=a?a.reverse():null};var P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){P.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=
-a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
-"4px";f.style.padding="4px 2px 4px 2px";f.rowState=c;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
-mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(f);this.graph.container.appendChild(f)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var S=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,f=this.state.style.shape;null==mxCellRenderer.defaultShapes[f]&&mxStencilRegistry.getStencil(f);f=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!f&&null!=this.customHandles)for(var b=0;b<this.customHandles.length;b++)if(null!=
-this.customHandles[b].shape&&null!=this.customHandles[b].shape.bounds){var d=this.customHandles[b].shape.bounds,e=d.getCenterX(),g=d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){f=!0;break}}f&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
-c):a=S.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+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 H=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(a,c){H.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 N=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){N.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&
+mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var H=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return H.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 G=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return G.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
+!this.graph.isTableRow(this.state.cell)};var v=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||v.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var K=mxVertexHandler.prototype.getSelectionBorderBounds;
+mxVertexHandler.prototype.getSelectionBorderBounds=function(){return K.apply(this,arguments).grow(-this.getSelectionBorderInset())};var A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,b=c.model,f=this.state,d=this.selectionBorder,e=this;null==a&&(a=[]);var g=c.view.getCellStates(b.getChildCells(this.state.cell,!0));if(0<g.length){for(var l=c.view.getCellStates(b.getChildCells(g[0].cell,
+!0)),b=0;b<l.length;b++)mxUtils.bind(this,function(b){var g=l[b],m=b<l.length-1?l[b+1]:null,v=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);v.isDashed=d.isDashed;v.svgStrokeTolerance++;v=new mxHandle(g,"col-resize",null,v);v.tableHandle=!0;var p=0;v.shape.node.parentNode.insertBefore(v.shape.node,v.shape.node.parentNode.firstChild);v.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=c.getActualStartSize(f.cell);this.shape.stroke=0==p?mxConstants.NONE:d.stroke;this.shape.bounds.x=
+this.state.x+this.state.width+p*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=f.y+(b==l.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=f.height-(b==l.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var t=!1;v.setPosition=function(a,b,f){p=Math.max(Graph.minTableColumnWidth-a.width,b.x-a.x-a.width);t=mxEvent.isShiftDown(f.getEvent());null==m||t||(p=Math.min((m.x+m.width-g.x-g.width)/c.view.scale-Graph.minTableColumnWidth,p))};v.execute=function(a){if(0!=
+p)c.setTableColumnWidth(this.state.cell,p,t);else if(!e.blockDelayedSelection){var b=c.getCellAt(a.getGraphX(),a.getGraphY())||f.cell;c.graphHandler.selectCellForEvent(b,a)}p=0};v.reset=function(){p=0};a.push(v)})(b);for(b=0;b<g.length;b++)mxUtils.bind(this,function(b){b=g[b];var l=new mxLine(new mxRectangle,mxConstants.NONE,1);l.isDashed=d.isDashed;l.svgStrokeTolerance++;b=new mxHandle(b,"row-resize",null,l);b.tableHandle=!0;var m=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);
+b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:d.stroke,this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+m*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};b.setPosition=function(a,c,b){m=Math.max(Graph.minTableRowHeight-a.height,c.y-a.y-a.height)};b.execute=function(a){if(0!=m)c.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(a.getEvent()));
+else if(!e.blockDelayedSelection){var b=c.getCellAt(a.getGraphX(),a.getGraphY())||f.cell;c.graphHandler.selectCellForEvent(b,a)}m=0};b.reset=function(){m=0};a.push(b)})(b)}}return null!=a?a.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){T.apply(this,arguments);if(null!=this.moveHandles)for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(c=0;c<this.cornerHandles.length;c++)this.cornerHandles[c].node.style.visibility=
+a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var c=0;c<this.moveHandles.length;c++)this.moveHandles[c].parentNode.removeChild(this.moveHandles[c]);this.moveHandles=null}this.moveHandles=[];for(c=0;c<a.getChildCount(this.state.cell);c++)mxUtils.bind(this,function(c){if(null!=c&&a.isVertex(c.cell)){var b=mxUtils.createImage(Editor.rowMoveImage);b.style.position="absolute";b.style.cursor="pointer";b.style.width="7px";b.style.height=
+"4px";b.style.padding="4px 2px 4px 2px";b.rowState=c;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(c.cell)||this.graph.selectCellForEvent(c.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
+mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),c.cell,a),mxEvent.consume(a))}));this.moveHandles.push(b);this.graph.container.appendChild(b)}})(this.graph.view.getState(a.getChildAt(this.state.cell,c)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.getStencil(b);b=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!b&&null!=this.customHandles)for(var f=0;f<this.customHandles.length;f++)if(null!=
+this.customHandles[f].shape&&null!=this.customHandles[f].shape.bounds){var d=this.customHandles[f].shape.bounds,e=d.getCenterX(),g=d.getCenterY();if(Math.abs(this.state.x-e)<d.width/2||Math.abs(this.state.y-g)<d.height/2||Math.abs(this.state.x+this.state.width-e)<d.width/2||Math.abs(this.state.y+this.state.height-g)<d.height/2){b=!0;break}}b&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,this.graph.isTable(this.state.cell)&&(c+=7),a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+
+c):a=O.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var f=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),f)+" x "+b(this.roundLength(this.bounds.height/c),f)}c=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+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 N=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(a,c){N.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 J=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,c){J.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,f){null==this.hint&&
(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(f.x/e-d.x),d=this.roundLength(f.y/e-d.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(d,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+
"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),f.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):
@@ -2688,310 +2688,310 @@ HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.pro
HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||
-mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var ea=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){ea.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&
-null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=
-!1,c.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,b=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(b=this.first.x,d=this.first.y,e=(this.currentX-b)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(f){if(mxEvent.isAltDown(c.getEvent())&&
-this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),u=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(u)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(u=this.graph.getCellsBeyond(b,d,this.graph.getDefaultParent(),!0,!0),f=0;f<u.length;f++)if(this.graph.isCellMovable(u[f])){var m=this.graph.view.getState(u[f]),p=this.graph.getCellGeometry(u[f]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,g),this.graph.model.setGeometry(u[f],
-p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),b=mxUtils.getOffset(this.graph.container);f.x-=b.x;f.y-=b.y;var b=c.getX()+f.x,f=c.getY()+f.y,d=this.first.x-b,e=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==
-this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(b,f),this.isSpaceEvent(c)?(b=this.x+this.width,f=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=b-this.width),this.y<this.first.y&&(this.y=f-this.height)),
+mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var S=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){S.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==
+a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=
+!1,c.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,f=null,d=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,g=(this.currentY-d)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&
+this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(f,d,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var m=this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]);null!=m&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],
+v))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(d)>g||Math.abs(e)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),
this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
-"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var ka=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
-this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ka.apply(this,arguments)};var na=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,f,b){T.apply(this,arguments);f!=this.currentTerminalState?(na=(new Date).getTime(),W=0):W=(new Date).getTime()-na;this.currentTerminalState=f};var Z=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
-this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Z.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var f=null!=a&&0==a,b=this.state.getVisibleTerminalState(f),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,b,f):null,f=null!=(null!=d?
-this.graph.getConnectionPoint(this.state.getVisibleTerminalState(f),d):null)?this.fixedHandleImage:null!=d&&null!=b?this.terminalHandleImage:this.handleImage;if(null!=f)return f=new mxImageShape(new mxRectangle(0,0,f.width,f.height),f.src),f.preserveImageAspect=!1,f;f=mxConstants.HANDLE_SIZE;this.preferHtml&&--f;return new mxRectangleShape(new mxRectangle(0,0,f,f),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var la=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
-function(a,c,f){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return la.apply(this,arguments)};var ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),f=c.getParent(a[0]),b=this.graph.getCellGeometry(a[0]);if(c.isEdge(f)&&null!=b&&b.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&
-null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ha.apply(this,arguments)};var V=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=V.apply(this,arguments),c=[],f=0;f<a.length;f++)"1"!=mxUtils.getValue(a[f].style,"part","0")&&c.push(a[f]);return c};var fa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),f=c.getParent(a.cell),
-b=this.graph.getCellGeometry(a.cell);return c.isEdge(f)&&null!=b&&b.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):fa.apply(this,arguments)};var R=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var f=this.graph.getModel(),b=f.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!f.isEdge(b)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&R.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var L=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){L.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 ga=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){ga.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 O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);var a=!1;
-null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));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 c=0;4>c;c++){var f=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);f.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
-mxConstants.DIALECT_SVG;f.init(this.graph.view.getOverlayPane());this.cornerHandles.push(f)}}var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);c=this.graph.getLinkForCell(this.state.cell);f=this.graph.getLinksForState(this.state);this.updateLinkHint(c,f);if(null!=c||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,f){try{if(null==c&&(null==f||0==f.length)||
-1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=f&&0<f.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var b=
-document.createElement("img");b.setAttribute("src",Editor.editImage);b.setAttribute("title",mxResources.get("editLink"));b.setAttribute("width","11");b.setAttribute("height","11");b.style.marginLeft="10px";b.style.marginBottom="-1px";b.style.cursor="pointer";this.linkHint.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);
-d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=f)for(b=0;b<f.length;b++){var e=document.createElement("div");e.style.marginTop=null!=c||0<b?"6px":"0px";e.appendChild(this.graph.createLinkForHint(f[b].getAttribute("href"),
-mxUtils.getTextContent(f[b])));this.linkHint.appendChild(e)}}}catch(Aa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var X=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){X.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
-null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,f){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
-f=this.graph.getLinksForState(this.state);if(null!=c||null!=f&&0<f.length)this.updateLinkHint(c,f),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 ja=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=
-this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),c=this.cornerHandles,f=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].bounds.width/2+a;c[0].bounds.y=this.state.y-f+a;c[0].redraw();c[1].bounds.x=c[0].bounds.x+this.state.width-2*a;c[1].bounds.y=c[0].bounds.y;c[1].redraw();c[2].bounds.x=c[0].bounds.x;
-c[2].bounds.y=this.state.y+this.state.height-2*a;c[2].redraw();c[3].bounds.x=c[1].bounds.x;c[3].bounds.y=c[2].bounds.y;c[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ja.apply(this);null!=this.state&&
-null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),f=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=f?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==f&&(f=this.state),f=f.y+f.height,null!=c&&(f=Math.max(f,c.y+c.height)),this.linkHint.style.left=
-Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(f+this.verticalOffset/2+Editor.hintOffset)+"px")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var ga=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ga.apply(this,arguments)};var ja=(new Date).getTime(),da=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){ba.apply(this,arguments);b!=this.currentTerminalState?(ja=(new Date).getTime(),da=0):da=(new Date).getTime()-ja;this.currentTerminalState=b};var W=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<da||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&W.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,f,b):null,b=null!=(null!=
+d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=
+function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return fa.apply(this,arguments)};var ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&
+null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return ha.apply(this,arguments)};var ka=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ka.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var U=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
+f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):U.apply(this,arguments)};var ea=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ea.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Q=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){Q.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
+"none"))};var L=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ca=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ca.apply(this,arguments);var a=!1;
+null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var c=0;4>c;c++){var b=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);b.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:
+mxConstants.DIALECT_SVG;b.init(this.graph.view.getOverlayPane());this.cornerHandles.push(b)}}var f=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));f()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);c=this.graph.getLinkForCell(this.state.cell);b=this.graph.getLinksForState(this.state);this.updateLinkHint(c,b);if(null!=c||null!=b&&0<b.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){try{if(null==c&&(null==b||0==b.length)||
+1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=
+document.createElement("img");f.setAttribute("src",Editor.editImage);f.setAttribute("title",mxResources.get("editLink"));f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);
+d.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var e=document.createElement("div");e.style.marginTop=null!=c||0<f?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),
+mxUtils.getTextContent(b[f])));this.linkHint.appendChild(e)}}}catch(na){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var R=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){R.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
+null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
+b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var Y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Z=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=
+this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),c=this.cornerHandles,b=c[0].bounds.height/2;c[0].bounds.x=this.state.x-c[0].bounds.width/2+a;c[0].bounds.y=this.state.y-b+a;c[0].redraw();c[1].bounds.x=c[0].bounds.x+this.state.width-2*a;c[1].bounds.y=c[0].bounds.y;c[1].redraw();c[2].bounds.x=c[0].bounds.x;
+c[2].bounds.y=this.state.y+this.state.height-2*a;c[2].redraw();c[3].bounds.x=c[1].bounds.x;c[3].bounds.y=c[2].bounds.y;c[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Z.apply(this);null!=this.state&&
+null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null,null==b&&(b=this.state),b=b.y+b.height,null!=c&&(b=Math.max(b,c.y+c.height)),this.linkHint.style.left=
+Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(b+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ca=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ca.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=
0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ia=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ia.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxCylinder.call(this)}function t(){mxShape.call(this)}function c(){mxShape.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function v(){mxActor.call(this)}function q(){mxActor.call(this)}
-function x(){mxActor.call(this)}function y(){mxActor.call(this)}function D(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,D.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,D.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,D.prototype.close);this.originalQuadTo=this.canvas.quadTo;
-this.canvas.quadTo=mxUtils.bind(this,D.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,D.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,D.prototype.arcTo)}function z(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}
-function K(){mxCylinder.call(this)}function u(){mxShape.call(this)}function J(){mxShape.call(this)}function B(){mxEllipse.call(this)}function P(){mxShape.call(this)}function S(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function N(){mxShape.call(this)}function ea(){mxShape.call(this)}function ka(){mxShape.call(this)}function na(){mxShape.call(this)}function W(){mxShape.call(this)}function T(){mxCylinder.call(this)}function Z(){mxCylinder.call(this)}function la(){mxRectangleShape.call(this)}
-function ha(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function R(){mxArrowConnector.call(this);this.spacing=0}function L(){mxActor.call(this)}function ga(){mxRectangleShape.call(this)}function O(){mxActor.call(this)}function X(){mxActor.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function M(){mxActor.call(this)}function ia(){mxActor.call(this)}function Y(){mxActor.call(this)}function da(){mxActor.call(this)}
-function Q(){mxActor.call(this)}function ba(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function Ba(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function sa(){mxActor.call(this)}function xa(){mxActor.call(this)}function ta(){mxActor.call(this)}function oa(){mxConnector.call(this)}function ya(a,c,f,b,
-d,e,g,u,m,p){g+=m;var aa=b.clone();b.x-=d*(2*g+m);b.y-=e*(2*g+m);d*=g+m;e*=g+m;return function(){a.ellipse(aa.x-d-g,aa.y-e-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,f,b,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-f));this.paintForeground(a,c,f,b,d)};a.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.state){var e=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var aa=e,e=g,g=aa;a.rotate(-this.getShapeRotation(),e,g,c+b/2,f+d/2);s=this.scale;c=this.bounds.x/s;f=this.bounds.y/s;b=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,
-c,f,b,d)}};a.prototype.paintTableForeground=function(a,c,f,b,d){var e=this.state.view.graph,g=e.getActualStartSize(this.state.cell),aa=e.model.getChildCells(this.state.cell,!0);if(0<aa.length){var u="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(u)for(u=1;u<aa.length;u++){var p=e.getCellGeometry(aa[u]);null!=p&&(a.begin(),a.moveTo(c+g.x,f+p.y),a.lineTo(c+b-g.width,f+p.y),a.end(),a.stroke())}if(m)for(b=e.model.getChildCells(aa[0],
-!0),u=1;u<b.length;u++)p=e.getCellGeometry(b[u]),null!=p&&(a.begin(),a.moveTo(c+p.x+g.x,f+g.y),a.lineTo(c+p.x+g.x,f+d-g.height),a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity",this.darkOpacity)))),aa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(b-e,0),a.lineTo(b,e),a.lineTo(e,e),a.close(),a.fill()),0!=aa&&
-(a.setFillAlpha(Math.abs(aa)),a.setFillColor(0>aa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(b,e),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var Da=
-Math.tan(mxUtils.toRadians(30)),ua=(.5-Da)/2;mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/Da);a.translate((b-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ua);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ua)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(b,d/(.5+Da));e?(a.moveTo(0,.25*c),a.lineTo(.5*
-c,(.5-ua)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-ua)*c),a.lineTo(.5*c,(1-ua)*c)):(a.translate((b-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ua),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ua)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||
-(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,b,2*c,b,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,b,-c/3,b,c),a.lineTo(b,d-c),a.curveTo(b,d+c/3,0,d+c/3,0,d-c),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);
-mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity=0;l.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,f);a.begin();a.moveTo(0,0);a.lineTo(b-e,0);a.lineTo(b,e);a.lineTo(b,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),
-0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.close(),a.fill()),a.begin(),a.moveTo(b-e,0),a.lineTo(b-e,e),a.lineTo(b,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(t,mxShape);t.prototype.isoAngle=15;t.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,e=Math.min(b*Math.tan(e),
-.5*d);a.translate(c,f);a.begin();a.moveTo(.5*b,0);a.lineTo(b,e);a.lineTo(b,d-e);a.lineTo(.5*b,d);a.lineTo(0,d-e);a.lineTo(0,e);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,e);a.lineTo(.5*b,2*e);a.lineTo(b,e);a.moveTo(.5*b,2*e);a.lineTo(.5*b,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",t);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-a.translate(c,f);0==e?(a.rect(0,0,b,d),a.fillAndStroke()):(a.begin(),a.moveTo(0,e),a.arcTo(.5*b,e,0,0,1,.5*b,0),a.arcTo(.5*b,e,0,0,1,b,e),a.lineTo(b,d-e),a.arcTo(.5*b,e,0,0,1,.5*b,d),a.arcTo(.5*b,e,0,0,1,0,d-e),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(b,e),a.arcTo(.5*b,e,0,0,1,.5*b,2*e),a.arcTo(.5*b,e,0,0,1,0,e),a.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b/2,.5*d,b,0);a.quadTo(.5*
-b,d/2,b,d);a.quadTo(b/2,.5*d,0,d);a.quadTo(.5*b,d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.redrawPath=function(a,c,f,b,d,e){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);
-e?"left"==g?(a.moveTo(0,f),a.lineTo(c,f)):(a.moveTo(b-c,f),a.lineTo(b,f)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f)):(a.moveTo(0,f),a.lineTo(b-c,f),a.lineTo(b-c,0),a.lineTo(b,0)),a.lineTo(b,d),a.lineTo(0,d),a.lineTo(0,f),a.close());a.end()};mxCellRenderer.registerShape("folder",g);mxUtils.extend(m,mxActor);m.prototype.size=30;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("card",m);mxUtils.extend(p,mxActor);p.prototype.size=.4;p.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(b/4,1.4*c,b/2,c/2);a.quadTo(3*
-b/4,c*(1-1.4),b,c/2);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};p.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),f=a.width,b=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=b,new mxRectangle(a.x,a.y+c,f,b-2*c);c*=f;return new mxRectangle(a.x+c,a.y,f-
-2*c,b)}return a};mxCellRenderer.registerShape("tape",p);mxUtils.extend(n,mxActor);n.prototype.size=.3;n.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};n.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,d-c/2);a.quadTo(3*b/4,d-1.4*c,b/2,d-c/2);a.quadTo(b/
-4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",n);var Qa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,f,b){var d=mxUtils.getValue(this.style,"size");return null!=d?b*Math.max(0,Math.min(1,d)):Qa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*
-this.scale,a.height*c),0,0)}return null};mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b-c,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("parallelogram",v);mxUtils.extend(q,mxActor);q.prototype.size=.2;q.prototype.fixedSize=20;q.prototype.isRoundable=function(){return!0};q.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,d)],this.isRounded,f,!0)};mxCellRenderer.registerShape("trapezoid",q);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,c,f,b,d){a.setFillColor(null);c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(b,d)],this.isRounded,f,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(a,c,f,b,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=b/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",
-y);D.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};D.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)};D.prototype.quadTo=function(a,c,f,b){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=b};D.prototype.curveTo=function(a,c,f,b,d,e){this.originalCurveTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=e};D.prototype.arcTo=function(a,c,f,b,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};D.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var f=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},b=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(b*b+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),aa=this.defaultVariation;
-5>g&&(g=5,aa/=3);for(var u=f(a-this.lastX)*b/g,f=f(c-this.lastY)*d/g,b=b/e,d=d/e,e=0;e<g;e++){var m=(Math.random()-.5)*aa;this.originalLineTo.call(this.canvas,u*e+this.lastX-m*d,f*e+this.lastY-m*b)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};D.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 Ra=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ra.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Sa=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Sa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new D(a,
-mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Ta=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"))&&Ta.apply(this,arguments)};var Ua=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,f,b,d){if(null==a.handJiggle||a.handJiggle.constructor!=D)Ua.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
-a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(b/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(b*e,d*e)),a.moveTo(c+e,f),a.lineTo(c+b-e,f),a.quadTo(c+b,f,c+b,f+e),a.lineTo(c+b,f+d-e),a.quadTo(c+b,f+d,c+b-e,f+d),a.lineTo(c+e,f+d),a.quadTo(c,f+d,c,f+d-e),a.lineTo(c,f+e),a.quadTo(c,
-f,c+e,f)):(a.moveTo(c,f),a.lineTo(c+b,f),a.lineTo(c+b,f+d),a.lineTo(c,f+d),a.lineTo(c,f)),a.close(),a.end(),a.fillAndStroke()}};var Xa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,f,b,d){null==a.handJiggle&&Xa.apply(this,arguments)};mxUtils.extend(z,mxRectangleShape);z.prototype.size=.1;z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,f=a.height;a=new mxRectangle(a.x,a.y,c,f);var b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,b=Math.max(b,Math.min(c*d,f*d));a.x+=Math.round(b);a.width-=Math.round(2*b)}return a};z.prototype.paintForeground=function(a,
-c,f,b,d){var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,f);a.lineTo(c+e,f+d);a.moveTo(c+b-e,f);a.lineTo(c+b-e,f+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",z);mxUtils.extend(E,mxRectangleShape);
-E.prototype.paintBackground=function(a,c,f,b,d){a.setFillColor(mxConstants.NONE);a.rect(c,f,b,d);a.fill()};E.prototype.paintForeground=function(a,c,f,b,d){};mxCellRenderer.registerShape("transparent",E);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};
-A.prototype.redrawPath=function(a,c,f,b,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),u=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
-[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-f),new mxPoint(Math.min(b,e+u),d-f),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-f),new mxPoint(0,d-f)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",
-this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("step",C);mxUtils.extend(G,mxHexagon);G.prototype.size=.25;G.prototype.fixedSize=20;G.prototype.isRoundable=function(){return!0};
-G.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.5*d),new mxPoint(b-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,f,
-!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(I,
-mxRectangleShape);I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};I.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var u=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],aa=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],n=this.style["symbol"+e+"Spacing"]||0,q=this.style["symbol"+e+"VSpacing"]||n,B=this.style["symbol"+e+"ArcSpacing"];null!=B&&(B*=this.getArcSize(b+this.strokewidth,
-d+this.strokewidth),n+=B,q+=B);var B=c,k=f,B=u==mxConstants.ALIGN_CENTER?B+(b-aa)/2:u==mxConstants.ALIGN_RIGHT?B+(b-aa-n):B+n,k=m==mxConstants.ALIGN_MIDDLE?k+(d-p)/2:m==mxConstants.ALIGN_BOTTOM?k+(d-p-q):k+q;a.save();u=new g;u.style=this.style;g.prototype.paintVertexShape.call(u,a,B,k,aa,p);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
-(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(u,mxShape);u.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};
-mxCellRenderer.registerShape("umlActor",u);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,c,
-f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,0);a.end();a.stroke();a.ellipse(0,d/8,b,7*d/8);a.fillAndStroke()};S.prototype.paintForeground=function(a,c,f,b,d){a.begin();a.moveTo(3*b/8,d/8*1.1);a.lineTo(5*b/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(H,mxRectangleShape);H.prototype.size=40;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=
-function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};H.prototype.paintBackground=function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,f,b,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=H&&(g=new g,
-g.apply(this.state),a.save(),g.paintVertexShape(a,c,f,b,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+b/2,f+e),a.lineTo(c+b/2,f+d),a.end(),a.stroke())};H.prototype.paintForeground=function(a,c,f,b,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,f,b,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",H);mxUtils.extend(N,mxShape);N.prototype.width=60;N.prototype.height=30;N.prototype.corner=
-10;N.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};N.prototype.paintBackground=function(a,c,f,b,d){var e=this.corner,g=Math.min(b,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),u=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
-mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,f,b,d),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,f,b,d),a.setGradient(this.fill,this.gradient,c,f,b,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,f);a.lineTo(c+g,f);a.lineTo(c+g,f+Math.max(0,u-1.5*e));a.lineTo(c+Math.max(0,g-e),f+u);a.lineTo(c,f+u);a.close();a.fillAndStroke();a.begin();
-a.moveTo(c+g,f);a.lineTo(c+b,f);a.lineTo(c+b,f+d);a.lineTo(c,f+d);a.lineTo(c,f+u);a.stroke()};mxCellRenderer.registerShape("umlFrame",N);mxPerimeter.LifelinePerimeter=function(a,c,f,b){b=H.prototype.size;null!=c&&(b=mxUtils.getValue(c.style,"size",b)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;f.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+b,f.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);
-mxPerimeter.OrthogonalPerimeter=function(a,c,f,b){b=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,f,b){b=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(b+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return f.x<
-a.getCenterX()&&(b=-1*(b+1)),new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y,f.y)));f.y<a.getCenterY()&&(b=-1*(b+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,f.x)),a.getCenterY()+b)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,f,b){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*
-c.view.scale))),c.style),c,f,b)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?v.prototype.fixedSize:v.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u)]):(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+d,u),new mxPoint(g+m,u),new mxPoint(g+m-d,u+p),new mxPoint(g,u+p),new mxPoint(g+d,u)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);b&&(f.x<g||f.x>g+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(u,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",
-mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?q.prototype.fixedSize:q.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+
-d,u),new mxPoint(g+m-d,u),new mxPoint(g+m,u+p),new mxPoint(g,u+p),new mxPoint(g+d,u)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u),new mxPoint(g+m-d,u+p),new mxPoint(g+d,u+p),new mxPoint(g,u)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u+d),new mxPoint(g+m,u),new mxPoint(g+m,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u+d)]):(d=d?Math.max(0,Math.min(p,e)):
-p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p-d),new mxPoint(g,u+p),new mxPoint(g,u)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);b&&(f.x<g||f.x>g+m?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(u,a,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?C.prototype.fixedSize:C.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
-"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(g+m-d,u),new mxPoint(g+m,a),new mxPoint(g+m-d,u+p),new mxPoint(g,u+p),new mxPoint(g+d,a),new mxPoint(g,u)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,
-e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+d,u),new mxPoint(g+m,u),new mxPoint(g+m-d,a),new mxPoint(g+m,u+p),new mxPoint(g+d,u+p),new mxPoint(g,a),new mxPoint(g+d,u)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u+d),new mxPoint(n,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p),new mxPoint(n,u+p-d),new mxPoint(g,u+p),new mxPoint(g,u+d)]):(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(g,u),new mxPoint(n,u+
-d),new mxPoint(g+m,u),new mxPoint(g+m,u+p-d),new mxPoint(n,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u)]);n=new mxPoint(n,a);b&&(f.x<g||f.x>g+m?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(u,n,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,f,b){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?G.prototype.fixedSize:G.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,u=a.y,m=a.width,
-p=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),u=[new mxPoint(n,u),new mxPoint(g+m,u+d),new mxPoint(g+m,u+p-d),new mxPoint(n,u+p),new mxPoint(g,u+p-d),new mxPoint(g,u+d),new mxPoint(n,u)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),u=[new mxPoint(g+
-d,u),new mxPoint(g+m-d,u),new mxPoint(g+m,a),new mxPoint(g+m-d,u+p),new mxPoint(g+d,u+p),new mxPoint(g,a),new mxPoint(g+d,u)]);n=new mxPoint(n,a);b&&(f.x<g||f.x>g+m?n.y=f.y:n.x=f.x);return mxUtils.getPerimeterPoint(u,n,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,f);a.ellipse((b-e)/2,0,e,e);
-a.fillAndStroke();a.begin();a.moveTo(b/2,e);a.lineTo(b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",ea);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.inset=2;ka.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,f);a.begin();a.moveTo(b/2,e+g);a.lineTo(b/2,d);a.end();a.stroke();a.begin();a.moveTo((b-e)/2-g,e/2);a.quadTo((b-
-e)/2-g,e+g,b/2,e+g);a.quadTo((b+e)/2+g,e+g,(b+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ka);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,c,f,b,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
-this.strokewidth;a.translate(c,f);a.ellipse(0,e,b-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(b/2,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",W);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=20;T.prototype.jettyHeight=10;T.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
-f=g/2;var g=f+g/2,u=Math.min(c,d-c),m=Math.min(u+2*c,d-c);e?(a.moveTo(f,u),a.lineTo(g,u),a.lineTo(g,u+c),a.lineTo(f,u+c),a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.lineTo(f,u+c),a.lineTo(0,u+c),a.lineTo(0,u),a.lineTo(f,u),a.close());a.end()};mxCellRenderer.registerShape("module",T);mxUtils.extend(Z,mxCylinder);Z.prototype.jettyWidth=32;Z.prototype.jettyHeight=12;
-Z.prototype.redrawPath=function(a,c,f,b,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));f=g/2;var g=f+g/2,u=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(f,u),a.lineTo(g,u),a.lineTo(g,u+c),a.lineTo(f,u+c),a.moveTo(f,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(f,m+c)):(a.moveTo(f,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(f,d),a.lineTo(f,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(f,m),a.lineTo(f,u+c),a.lineTo(0,
-u+c),a.lineTo(0,u),a.lineTo(f,u),a.close());a.end()};mxCellRenderer.registerShape("component",Z);mxUtils.extend(la,mxRectangleShape);la.prototype.paintForeground=function(a,c,f,b,d){var e=b/2,g=d/2,u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,f),new mxPoint(c+b,f+g),new mxPoint(c+e,f+d),new mxPoint(c,f+g)],this.isRounded,u,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
-la);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,c,f,b,d){var e=Math.min(4,Math.min(b/5,d/5));0<b&&0<d&&(a.ellipse(c+e,f+e,b-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,f,b,d),a.stroke())};mxCellRenderer.registerShape("endState",ha);mxUtils.extend(V,ha);V.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",V);mxUtils.extend(fa,mxArrowConnector);fa.prototype.defaultWidth=4;fa.prototype.isOpenEnded=
-function(){return!0};fa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};fa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",fa);mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=10;R.prototype.defaultArrowWidth=20;R.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};R.prototype.getEndArrowWidth=
-function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",R);mxUtils.extend(L,mxActor);L.prototype.size=30;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));f=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(b,0),new mxPoint(b,d)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("manualInput",L);mxUtils.extend(ga,mxRectangleShape);ga.prototype.dx=20;ga.prototype.dy=20;ga.prototype.isHtmlAllowed=function(){return!1};ga.prototype.paintForeground=function(a,c,f,b,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(b*g,d*g));g=Math.max(e,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,f+e);a.lineTo(c+b,f+e);a.end();a.stroke();a.begin();a.moveTo(c+g,f);a.lineTo(c+g,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ga);mxUtils.extend(O,mxActor);O.prototype.dx=20;O.prototype.dy=
-20;O.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint(c,f),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};
-mxCellRenderer.registerShape("corner",O);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(b,0);a.lineTo(b,d);a.end();a.moveTo(0,d/2);a.lineTo(b,d/2);a.end()};mxCellRenderer.registerShape("crossbar",X);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,c,f,b,d){c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,f),new mxPoint((b+c)/2,f),new mxPoint((b+c)/2,d),new mxPoint((b-c)/2,d),new mxPoint((b-c)/2,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(ja,mxActor);ja.prototype.arrowWidth=.3;ja.prototype.arrowSize=.2;ja.prototype.redrawPath=
-function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-ja);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,c,f,b,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ja.prototype.arrowWidth))));c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ja.prototype.arrowSize))));f=(d-e)/2;var e=f+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(b-c,f),new mxPoint(b-c,0),new mxPoint(b,
-d/2),new mxPoint(b-c,d),new mxPoint(b-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",M);mxUtils.extend(ia,mxActor);ia.prototype.size=.1;ia.prototype.fixedSize=20;ia.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,
-0);a.lineTo(b,0);a.quadTo(b-2*c,d/2,b,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ia);mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",Y);mxUtils.extend(da,mxActor);da.prototype.redrawPath=function(a,c,f,b,d){a.moveTo(0,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,0,d);a.quadTo(b/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
-da);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(b-c,0),new mxPoint(b,.8*c),new mxPoint(b,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
-Q);mxUtils.extend(ba,mxActor);ba.prototype.size=.375;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,c,f,b,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(b,0),new mxPoint(b,d-c),new mxPoint(b/2,d),new mxPoint(0,d-c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",
-ba);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/2,f+d);a.lineTo(c+b,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke();a.begin();a.moveTo(c+b/2,f);
-a.lineTo(c+b/2,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",pa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*b,f+.145*d);a.lineTo(c+.855*b,f+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*b,f+.145*d);a.lineTo(c+.145*b,f+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=
-function(a,c,f,b,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,f+d/2);a.lineTo(c+b,f+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,c,f,b,d){a.begin();a.moveTo(c,f);a.lineTo(c+b,f);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,f+d);a.lineTo(c+b,f+d);a.lineTo(c+b/2,f+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",
-Ba);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,c,f,b,d){var e=f+d-5;a.begin();a.moveTo(c,f);a.lineTo(c,f+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+b,e);a.moveTo(c+b,f);a.lineTo(c+b,f+d);a.moveTo(c+b,e);a.lineTo(c+b-10,e-5);a.moveTo(c+b,e);a.lineTo(c+b-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",ra);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,f,b,d){this.outline||a.setStrokeColor(null);
-if(null!=this.style){var e=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(c,f,b,d);a.fill();a.pointerEvents=e;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,f);"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+b,f):a.moveTo(c+b,f);"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+b,f+d):a.moveTo(c+b,f+d);"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,f+d):a.moveTo(c,
-f+d);"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,f);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",wa);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,c,f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+b/2,f),a.lineTo(c+b/2,f+d)):(a.moveTo(c,f+d/2),a.lineTo(c+b,f+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",Ca);mxUtils.extend(sa,
-mxActor);sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(0,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",sa);mxUtils.extend(xa,mxActor);xa.prototype.size=.2;xa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(d,b);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;f=c+e;var g=(b-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,
-0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()};mxCellRenderer.registerShape("display",
-ta);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,f])))};
-mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1);return function(){a.begin();
-a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1),B=b.x+n/2,k=b.y+q/2;b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(B-n/2-q/2,k-q/2+n/2);a.lineTo(B-n/2+q/2,k-q/2-n/2);a.lineTo(B+q/2-3*n/2,k-3*q/2-n/2);a.lineTo(B-q/2-3*n/2,k-3*q/2+n/2);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1);return function(){a.begin();
-a.moveTo(b.x-n/2-q/2,b.y-q/2+n/2);a.lineTo(b.x+q/2-3*n/2,b.y-3*q/2-n/2);a.moveTo(b.x-n/2+q/2,b.y-q/2-n/2);a.lineTo(b.x-q/2-3*n/2,b.y-3*q/2+n/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,u,m,p){var n=b.clone(),q=ya.apply(this,arguments),B=d*(g+2*m),k=e*(g+2*m);return function(){q.apply(this,arguments);a.begin();a.moveTo(n.x-d*m,n.y-e*m);a.lineTo(n.x-2*B+d*m,n.y-2*k+e*m);a.moveTo(n.x-B-k+e*m,n.y-k+B-d*m);a.lineTo(n.x+k-B-e*m,n.y-k-B+d*m);a.stroke()}});
-mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,u,m,p){var n=d*(g+m+1),q=e*(g+m+1),B=b.clone();b.x-=n;b.y-=q;return function(){a.begin();a.moveTo(B.x-q,B.y+n);a.quadTo(b.x-q,b.y+n,b.x,b.y);a.quadTo(b.x+q,b.y-n,B.x+q,B.y-n);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,u,m,p){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var n=b.clone();n.x-=c;n.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(n.x,n.y);u?a.lineTo(n.x-d-e/2,n.y-e+d/2):a.lineTo(n.x+e/2-d,n.y-e-d/2);
-a.lineTo(n.x-d,n.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,u,m,p,n){e*=u+p;g*=u+p;var q=d.clone();return function(){c.begin();c.moveTo(q.x,q.y);m?c.lineTo(q.x-e-g/a,q.y-g+e/a):c.lineTo(q.x+g/a-e,q.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,f){return Fa(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+
-d*c/4-b*g/2)},function(c,b,d,e,g,u){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Fa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,u=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-u.x,m=d.y-u.y,p=Math.sqrt(e*e+m*m),u=b.call(this,p,e/p,m/p,u,d);return new mxPoint(u.x/g-c.x,u.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,u=g.length-1;c=a.view.translate;var m=a.view.scale,p=f?g[0]:
-g[u],g=f?g[1]:g[u-1],u=g.x-p.x,n=g.y-p.y,q=Math.sqrt(u*u+n*n);b.x=(b.x+c.x)*m;b.y=(b.y+c.y)*m;d.call(this,q,u/q,n/q,p,g,b,e)})},za=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ja.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ja.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth=
-Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-f.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-f.x)/c.width))})]}},Ka=function(a,c,f){return function(b){var d=[U(b,["size"],function(f){var b=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(f.x+b,f.y+b)},function(c,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,f.x-c.x),Math.min(c.height,f.y-c.y)))/a)},!1)];f&&mxUtils.getValue(b.style,
-mxConstants.STYLE_ROUNDED,!1)&&d.push(va(b));return d}},Ga=function(a,c,f,b,d){f=null!=f?f:.5;return function(e){var g=[U(e,["size"],function(c){var f=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,b=parseFloat(mxUtils.getValue(this.state.style,"size",f?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,b*(f?1:c.width))),c.getCenterY())},function(a,c,b){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-a.x:Math.max(0,Math.min(f,(c.x-a.x)/a.width));
-this.state.style.size=a},!1,b)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Ma=function(a,c,f){a=null!=a?a:.5;return function(b){var d=[U(b,["size"],function(b){var d=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?f:c)));return new mxPoint(b.x+Math.min(.75*b.width*a,e*(d?.75:.75*b.width)),b.y+b.height/4)},function(c,b){var d=null!=f&&"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?b.x-c.x:Math.max(0,Math.min(a,(b.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(b));return d}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return U(a,[mxConstants.STYLE_ARCSIZE],function(f){var b=null!=c?c:f.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(f.x+f.width-Math.min(f.width/2,d),f.y+b)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(f.x+f.width-Math.min(Math.max(f.width/2,f.height/2),Math.min(f.width,f.height)*d),f.y+b)},function(c,f,b){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,
-2*(c.x+c.width-f.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-f.x+c.x)/Math.min(c.width,c.height))))})},U=function(a,c,f,b,d,e,g){var u=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);u.execute=function(a){for(var f=0;f<c.length;f++)this.copyStyle(c[f]);g&&g(a)};u.getPosition=f;u.setPosition=b;u.ignoreGrid=null!=d?d:!0;if(e){var m=u.positionChanged;u.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);
-a.view.validate()}}return u},Ha={link:function(a){return[Pa(a,!0,10),Pa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,f=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
-f*(e+a.shape.strokewidth*a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||
-Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),f.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,f,b,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*
-a.view.scale)+b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=
-a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(f.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(c,f,b,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/
-3)/100/a.view.scale;a.style.width=Math.round(2*f)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),f.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,
-f,b,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2,d.y+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2)},function(f,b,d,e,g,u,m){f=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,u.x,u.y));b=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-b,u.x,u.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(b-a.shape.strokewidth)/3)/100/a.view.scale;
-a.style.endWidth=Math.max(0,Math.round(2*f)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
-c&&(a.style.endWidth=a.style.startWidth))})));return f},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,f/2))}c.push(U(a,[mxConstants.STYLE_STARTSIZE],function(c){var f=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
-c.y+Math.max(0,Math.min(c.height,f))):new mxPoint(c.x+Math.max(0,Math.min(c.width,f)),c.getCenterY())},function(c,f){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,f.y-c.y))):Math.round(Math.max(0,Math.min(c.width,f.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var f=c.getSwimlaneDirection(a.style),b=c.model.getParent(a.cell),
-b=c.model.getChildCells(b,!0),d=[],e=0;e<b.length;e++)b[e]!=a.cell&&c.isSwimlane(b[e])&&c.getSwimlaneDirection(c.getCurrentCellStyle(b[e]))==f&&d.push(b[e]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[U(a,["width","height"],function(a){var c=Math.max(N.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",N.prototype.width))),f=Math.max(1.5*N.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",N.prototype.height)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.width=Math.round(Math.max(N.prototype.corner,
-Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*N.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[U(a,
-["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",xa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var f=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/f*2,Math.max(0,a.getCenterX()-c.x)/f*2)))})]},note:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",l.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[U(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",L.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];
-mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},dataStorage:function(a){return[U(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),f=parseFloat(mxUtils.getValue(this.state.style,"size",c?ia.prototype.fixedSize:ia.prototype.size));return new mxPoint(a.x+a.width-f*(c?1:a.width),a.getCenterY())},function(a,c){var f="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,
-(a.x+a.width-c.x)/a.width));this.state.style.size=f},!1)]},callout:function(a){var c=[U(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+f*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=
-Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),U(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),U(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"size",A.prototype.size))),f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,f*a.width+b),a.y+a.height-c)},function(a,c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-f*a.width)))},!1)];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ga.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ga.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[U(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",T.prototype.jettyWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",T.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*f)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,
-Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[U(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(a.x+c,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},tee:function(a){return[U(a,["dx","dy"],
-function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+f)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[U(a,["tabWidth","tabHeight"],
-function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),f=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+f)},function(a,c){var f=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(f=a.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[U(a,["size"],function(a){var c=Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[U(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",t.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,c){this.state.style.isoAngle=
-Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[U(a,["size"],function(a){var f=Math.max(0,Math.min(.5*a.height,parseFloat(mxUtils.getValue(this.state.style,"size",c.size))));return new mxPoint(a.x,a.y+f)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]},offPageConnector:function(a){return[U(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},
-function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0,G.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(ta.prototype.size,!1),cube:Ka(1,b.prototype.size,!1),card:Ka(.5,m.prototype.size,!0),loopLimit:Ka(.5,Q.prototype.size,!0),trapezoid:Ma(.5,q.prototype.size,q.prototype.fixedSize),parallelogram:Ma(1,v.prototype.size,v.prototype.fixedSize)};Graph.createHandle=
-U;Graph.handleFactory=Ha;var Va=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Va.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
-Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,u=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==u&&null!=c&&(u=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,p=Ia.y,n=Ja.x,q=Ja.y,B="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=u){a=function(a,c,f){a-=k.x;var b=c-k.y;c=(q*a-n*b)/(m*q-p*n);a=(p*a-m*b)/(p*n-m*q);B?(f&&(k=new mxPoint(k.x+m*c,k.y+p*c),d.push(k)),k=new mxPoint(k.x+n*a,k.y+q*a)):(f&&(k=new mxPoint(k.x+n*a,k.y+q*a),d.push(k)),k=new mxPoint(k.x+m*c,k.y+p*c));d.push(k)};var k=u;null==b&&(b=new mxPoint(u.x+(g.x-u.x)/2,u.y+(g.y-u.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Wa.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};t.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*Math.tan(b),.5*f);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
-a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};A.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-b)));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,
+this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var M=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(M.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
+this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ma=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxShape.call(this)}function q(){mxShape.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function g(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function t(){mxActor.call(this)}function p(){mxActor.call(this)}
+function x(){mxActor.call(this)}function C(){mxActor.call(this)}function z(a,c){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,z.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,z.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,z.prototype.close);this.originalQuadTo=this.canvas.quadTo;
+this.canvas.quadTo=mxUtils.bind(this,z.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,z.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,z.prototype.arcTo)}function D(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function B(){mxActor.call(this)}function E(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function H(){mxRectangleShape.call(this)}
+function G(){mxCylinder.call(this)}function v(){mxShape.call(this)}function K(){mxShape.call(this)}function A(){mxEllipse.call(this)}function T(){mxShape.call(this)}function O(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function S(){mxShape.call(this)}function ga(){mxShape.call(this)}function ja(){mxShape.call(this)}function da(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function W(){mxCylinder.call(this)}function fa(){mxRectangleShape.call(this)}
+function ha(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function U(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function R(){mxActor.call(this)}function Y(){mxActor.call(this)}function Z(){mxActor.call(this)}function Ca(){mxActor.call(this)}function M(){mxActor.call(this)}function ma(){mxActor.call(this)}function aa(){mxActor.call(this)}
+function P(){mxActor.call(this)}function ia(){mxActor.call(this)}function la(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function na(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ya(){mxActor.call(this)}function pa(){mxActor.call(this)}function za(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,c,b,f,
+d,e,g,l,m,v){g+=m;var X=f.clone();f.x-=d*(2*g+m);f.y-=e*(2*g+m);d*=g+m;e*=g+m;return function(){a.ellipse(X.x-d-g,X.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,c,b,f,d){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-c,-b));this.paintForeground(a,c,b,f,d)};a.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.state){var e=this.flipH,X=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=e,e=X,X=g;a.rotate(-this.getShapeRotation(),e,X,c+f/2,b+d/2);s=this.scale;c=this.bounds.x/s;b=this.bounds.y/s;f=this.bounds.width/s;d=this.bounds.height/s;this.paintTableForeground(a,
+c,b,f,d)}};a.prototype.paintTableForeground=function(a,c,b,f,d){var e=this.state.view.graph,X=e.getActualStartSize(this.state.cell),g=e.model.getChildCells(this.state.cell,!0);if(0<g.length){var l="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(l)for(l=1;l<g.length;l++){var v=e.getCellGeometry(g[l]);null!=v&&(a.begin(),a.moveTo(c+X.x,b+v.y),a.lineTo(c+f-X.width,b+v.y),a.end(),a.stroke())}if(m)for(f=e.model.getChildCells(g[0],!0),
+l=1;l<f.length;l++)v=e.getCellGeometry(f[l]),null!=v&&(a.begin(),a.moveTo(c+v.x+X.x,b+X.y),a.lineTo(c+v.x+X.x,b+d-X.height),a.end(),a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity",this.darkOpacity)))),X=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(e,d);a.lineTo(0,d-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=X&&
+(a.setFillAlpha(Math.abs(X)),a.setFillColor(0>X?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(f,e),a.end(),a.stroke())};b.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",b);var ta=Math.tan(mxUtils.toRadians(30)),
+ua=(.5-ta)/2;mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/ta);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*ua);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-ua)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+ta));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-ua)*c),a.lineTo(c,.25*c),
+a.moveTo(.5*c,(.5-ua)*c),a.lineTo(.5*c,(1-ua)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*ua),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-ua)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,
+c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};k.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",k);mxUtils.extend(n,mxCylinder);n.prototype.size=
+30;n.prototype.darkOpacity=0;n.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(f-e,0);a.lineTo(f,e);a.lineTo(f,d);a.lineTo(0,d);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>
+g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.close(),a.fill()),a.begin(),a.moveTo(f-e,0),a.lineTo(f-e,e),a.lineTo(f,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",n);mxUtils.extend(u,mxShape);u.prototype.isoAngle=15;u.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,e=Math.min(f*Math.tan(e),.5*d);a.translate(c,b);a.begin();a.moveTo(.5*f,0);a.lineTo(f,
+e);a.lineTo(f,d-e);a.lineTo(.5*f,d);a.lineTo(0,d-e);a.lineTo(0,e);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,e);a.lineTo(.5*f,2*e);a.lineTo(f,e);a.moveTo(.5*f,2*e);a.lineTo(.5*f,d);a.stroke()};mxCellRenderer.registerShape("isoCube2",u);mxUtils.extend(q,mxShape);q.prototype.size=15;q.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.translate(c,b);0==e?(a.rect(0,0,f,d),a.fillAndStroke()):
+(a.begin(),a.moveTo(0,e),a.arcTo(.5*f,e,0,0,1,.5*f,0),a.arcTo(.5*f,e,0,0,1,f,e),a.lineTo(f,d-e),a.arcTo(.5*f,e,0,0,1,.5*f,d),a.arcTo(.5*f,e,0,0,1,0,d-e),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(f,e),a.arcTo(.5*f,e,0,0,1,.5*f,2*e),a.arcTo(.5*f,e,0,0,1,0,e),a.stroke())};mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(c,mxActor);c.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,
+d/2,0,0);a.end()};mxCellRenderer.registerShape("switch",c);mxUtils.extend(f,mxCylinder);f.prototype.tabWidth=60;f.prototype.tabHeight=20;f.prototype.tabPosition="right";f.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,
+b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.registerShape("folder",f);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("card",g);mxUtils.extend(l,mxActor);l.prototype.size=.4;l.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/2);a.quadTo(3*f/4,c*(1-1.4),f,
+c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};l.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,f)}return a};
+mxCellRenderer.registerShape("tape",l);mxUtils.extend(m,mxActor);m.prototype.size=.3;m.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};m.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-
+1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",m);var Ka=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,f){var d=mxUtils.getValue(this.style,"size");return null!=d?f*Math.max(0,Math.min(1,d)):Ka.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,
+a.height*c),0,0)}return null};mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",t);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.fixedSize=20;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",
+C);z.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};z.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)};z.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};z.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,
+arguments);this.lastX=d;this.lastY=e};z.prototype.arcTo=function(a,c,b,f,d,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};z.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),l=this.defaultVariation;
+5>g&&(g=5,l/=3);for(var X=b(a-this.lastX)*f/g,b=b(c-this.lastY)*d/g,f=f/e,d=d/e,e=0;e<g;e++){var m=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,X*e+this.lastX-m*d,b*e+this.lastY-m*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};z.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 Qa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Qa.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Ra=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Ra.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new z(a,
+mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Sa=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"))&&Sa.apply(this,arguments)};var Ta=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle||a.handJiggle.constructor!=z)Ta.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
+a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,
+b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Wa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Wa.apply(this,arguments)};mxUtils.extend(D,mxRectangleShape);D.prototype.size=.1;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};D.prototype.paintForeground=function(a,
+c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",D);mxUtils.extend(I,mxRectangleShape);
+I.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};I.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",I);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable=function(){return!0};
+y.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",y);mxUtils.extend(B,mxActor);B.prototype.size=.2;B.prototype.fixedSize=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",
+this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",B);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.fixedSize=20;E.prototype.isRoundable=function(){return!0};
+E.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,
+!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
+this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,b,f,d]))}};mxUtils.extend(H,
+mxRectangleShape);H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};H.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],X=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(f+this.strokewidth,
+d+this.strokewidth),p+=x,t+=x);var x=c,A=b,x=l==mxConstants.ALIGN_CENTER?x+(f-v)/2:l==mxConstants.ALIGN_RIGHT?x+(f-v-p):x+p,A=m==mxConstants.ALIGN_MIDDLE?A+(d-X)/2:m==mxConstants.ALIGN_BOTTOM?A+(d-X-t):A+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,x,A,v,X);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",H);mxUtils.extend(G,mxCylinder);G.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,
+0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",G);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",
+v);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};K.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",A);mxUtils.extend(T,mxShape);T.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",T);mxUtils.extend(O,mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=
+function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,d/8,f,7*d/8);a.fillAndStroke()};O.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",O);mxUtils.extend(N,mxRectangleShape);N.prototype.size=40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};N.prototype.paintBackground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=N&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),
+a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};N.prototype.paintForeground=function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,
+"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,g=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(c,b,f,d),
+a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(a,c,b,f,d),a.setGradient(this.fill,this.gradient,c,b,f,d,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,b+d);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",
+J);mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=N.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
+mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&
+(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",y.prototype.size))*c.view.scale))),c.style),c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=
+function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l+d),
+new mxPoint(g+m,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l)]):(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m,l),new mxPoint(g+m-d,l+v),new mxPoint(g,l+v),new mxPoint(g+d,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,f){var d="0"!=
+mxUtils.getValue(c.style,"fixedSize","0"),e=d?p.prototype.fixedSize:p.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(.5*m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,l+v),new mxPoint(g,l+v),new mxPoint(g+d,l)]):
+c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l),new mxPoint(g+m-d,l+v),new mxPoint(g+d,l+v),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m,l+d),new mxPoint(g+m,
+l+v-d),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?B.prototype.fixedSize:B.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height,p=
+a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+v),new mxPoint(g,l+v),new mxPoint(g+d,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+
+m,l),new mxPoint(g+m-d,a),new mxPoint(g+m,l+v),new mxPoint(g+d,l+v),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(p,l),new mxPoint(g+m,l+d),new mxPoint(g+m,l+v),new mxPoint(p,l+v-d),new mxPoint(g,l+v),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(p,l+d),new mxPoint(g+m,l),new mxPoint(g+m,l+v-d),new mxPoint(p,l+v),new mxPoint(g,
+l+v-d),new mxPoint(g,l)]);p=new mxPoint(p,a);f&&(b.x<g||b.x>g+m?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=d?E.prototype.fixedSize:E.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));d&&(e*=c.view.scale);var g=a.x,l=a.y,m=a.width,v=a.height,p=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=d?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(p,l),new mxPoint(g+m,l+d),new mxPoint(g+m,l+v-d),new mxPoint(p,l+v),new mxPoint(g,l+v-d),new mxPoint(g,l+d),new mxPoint(p,l)]):(d=d?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+m-d,l),new mxPoint(g+m,a),new mxPoint(g+m-d,l+v),new mxPoint(g+
+d,l+v),new mxPoint(g,a),new mxPoint(g+d,l)]);p=new mxPoint(p,a);f&&(b.x<g||b.x>g+m?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",
+S);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",
+ga);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ja);mxUtils.extend(da,mxShape);da.prototype.inset=2;da.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,
+0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",da);mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=20;ba.prototype.jettyHeight=10;ba.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(c,d-c),m=Math.min(l+2*c,d-c);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,
+l+c),a.moveTo(b,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",ba);mxUtils.extend(W,mxCylinder);W.prototype.jettyWidth=32;W.prototype.jettyHeight=12;W.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));
+c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,m),a.lineTo(g,m),a.lineTo(g,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",W);mxUtils.extend(fa,mxRectangleShape);
+fa.prototype.paintForeground=function(a,c,b,f,d){var e=f/2,g=d/2,l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,b),new mxPoint(c+f,b+g),new mxPoint(c+e,b+d),new mxPoint(c,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",fa);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=
+function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.registerShape("endState",ha);mxUtils.extend(ka,ha);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(U,mxArrowConnector);U.prototype.defaultWidth=4;U.prototype.isOpenEnded=function(){return!0};U.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};U.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",U);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=10;ea.prototype.defaultArrowWidth=20;ea.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ea.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",
+this.defaultArrowWidth)};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ea);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",Q);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,e=Math.max(e,Math.min(f*g,d*g));g=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",L);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ca);mxUtils.extend(R,mxActor);
+R.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.registerShape("crossbar",R);mxUtils.extend(Y,mxActor);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
+"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",Y);mxUtils.extend(Z,mxActor);Z.prototype.arrowWidth=.3;Z.prototype.arrowSize=.2;Z.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",Z);mxUtils.extend(Ca,
+mxActor);Ca.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize))));b=(d-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-
+c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",Ca);mxUtils.extend(M,mxActor);M.prototype.size=.1;M.prototype.fixedSize=20;M.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);
+a.quadTo(f-2*c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",M);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.registerShape("or",ma);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
+aa);mxUtils.extend(P,mxActor);P.prototype.size=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
+P);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",
+ia);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);
+a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",sa);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(na,mxRhombus);na.prototype.paintVertexShape=
+function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",na);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",
+Da);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",wa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);
+if(null!=this.style){var e=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(c,b,f,d);a.fill();a.pointerEvents=e;a.setStrokeColor(this.stroke);a.begin();a.moveTo(c,b);"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b);"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d);"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,
+b+d);"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",xa);mxUtils.extend(ya,
+mxActor);ya.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,d);a.close();a.end()};mxCellRenderer.registerShape("delay",ya);mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var g=(f-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,
+0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",pa);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};mxCellRenderer.registerShape("display",
+za);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,b){for(var f=[],d=0;d<c.length;d++)f.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,f,b]);3<=a.state.strokeWidth&&(f=mxUtils.getValue(this.style,"fillColor",null),null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};
+mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return b}}();mxMarker.addMarker("dash",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
+a.moveTo(f.x-p/2-t/2,f.y-t/2+p/2);a.lineTo(f.x+t/2-3*p/2,f.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),x=f.x+p/2,A=f.y+t/2;f.x-=p;f.y-=t;return function(){a.begin();a.moveTo(x-p/2-t/2,A-t/2+p/2);a.lineTo(x-p/2+t/2,A-t/2-p/2);a.lineTo(x+t/2-3*p/2,A-3*t/2-p/2);a.lineTo(x-t/2-3*p/2,A-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
+a.moveTo(f.x-p/2-t/2,f.y-t/2+p/2);a.lineTo(f.x+t/2-3*p/2,f.y-3*t/2-p/2);a.moveTo(f.x-p/2+t/2,f.y-t/2-p/2);a.lineTo(f.x-t/2-3*p/2,f.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,g,l,m,v){var p=f.clone(),t=Aa.apply(this,arguments),x=d*(g+2*m),A=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*x+d*m,p.y-2*A+e*m);a.moveTo(p.x-x-A+e*m,p.y-A+x-d*m);a.lineTo(p.x+A-x-e*m,p.y-A-x+d*m);a.stroke()}});
+mxMarker.addMarker("halfCircle",function(a,c,b,f,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),x=f.clone();f.x-=p;f.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+p);a.quadTo(f.x-t,f.y+p,f.x,f.y);a.quadTo(f.x+t,f.y-p,x.x+t,x.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,g,l,m,v){c=d*m*1.118;b=e*m*1.118;d*=g+m;e*=g+m;var p=f.clone();p.x-=c;p.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
+a.lineTo(p.x-d,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,g,l,m,v,p){e*=l+v;g*=l+v;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,b){return Fa(a,["width"],c,function(c,f,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*g/2,e.y+
+d*c/4-f*g/2)},function(c,f,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},Fa=function(a,c,b,f,d){return V(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=b?d[0]:d[e],d=b?d[1]:d[e-1],e=d.x-l.x,m=d.y-l.y,v=Math.sqrt(e*e+m*m),l=f.call(this,v,e/v,m/v,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,f,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var m=a.view.scale,v=b?g[0]:
+g[l],g=b?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);f.x=(f.x+c.x)*m;f.y=(f.y+c.y)*m;d.call(this,t,l/t,p/t,v,g,f,e)})},Ba=function(a){return function(c){return[V(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Z.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",Z.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=
+Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},La=function(a,c,b){return function(f){var d=[V(f,["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)},!1)];b&&mxUtils.getValue(f.style,
+mxConstants.STYLE_ROUNDED,!1)&&d.push(va(f));return d}},Ga=function(a,c,b,f,d){b=null!=b?b:.5;return function(e){var g=[V(e,["size"],function(c){var b=null!=d?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=parseFloat(mxUtils.getValue(this.state.style,"size",b?d:a));return new mxPoint(c.x+Math.max(0,Math.min(.5*c.width,f*(b?1:c.width))),c.getCenterY())},function(a,c,f){a=null!=d&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));
+this.state.style.size=a},!1,f)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(va(e));return g}},Ma=function(a,c,b){a=null!=a?a:.5;return function(f){var d=[V(f,["size"],function(f){var d=null!=b?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,e=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",d?b:c)));return new mxPoint(f.x+Math.min(.75*f.width*a,e*(d?.75:.75*f.width)),f.y+f.height/4)},function(c,f){var d=null!=b&&"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?f.x-c.x:Math.max(0,Math.min(a,(f.x-c.x)/c.width*.75));this.state.style.size=d},!1,!0)];mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(va(f));return d}},Ea=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c}},va=function(a,c){return V(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,
+2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},V=function(a,c,b,f,d,e,g){var l=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);l.execute=function(a){for(var b=0;b<c.length;b++)this.copyStyle(c[b]);g&&g(a)};l.getPosition=b;l.setPosition=f;l.ignoreGrid=null!=d?d:!0;if(e){var m=l.positionChanged;l.positionChanged=function(){m.apply(this,arguments);a.view.invalidate(this.state.cell);
+a.view.validate()}}return l},Ha={link:function(a){return[Pa(a,!0,10),Pa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+
+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||
+Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*
+a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=
+a.style.startWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,
+b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,g,l,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;
+a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
+c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(va(a,b/2))}c.push(V(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
+c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))},!1,null,function(c){if(mxEvent.isControlDown(c.getEvent())&&(c=a.view.graph,c.isTableRow(a.cell)||c.isTableCell(a.cell))){for(var b=c.getSwimlaneDirection(a.style),f=c.model.getParent(a.cell),
+f=c.model.getChildCells(f,!0),d=[],e=0;e<f.length;e++)f[e]!=a.cell&&c.isSwimlane(f[e])&&c.getSwimlaneDirection(c.getCurrentCellStyle(f[e]))==b&&d.push(f[e]);c.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return c},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,["width","height"],function(a){var c=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),b=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(J.prototype.corner,
+Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[V(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},cross:function(a){return[V(a,
+["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",n.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[V(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))},!1)];
+mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},dataStorage:function(a){return[V(a,["size"],function(a){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),b=parseFloat(mxUtils.getValue(this.state.style,"size",c?M.prototype.fixedSize:M.prototype.size));return new mxPoint(a.x+a.width-b*(c?1:a.width),a.getCenterY())},function(a,c){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-c.x)):Math.max(0,Math.min(1,
+(a.x+a.width-c.x)/a.width));this.state.style.size=b},!1)]},callout:function(a){var c=[V(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=
+Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),V(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100},!1),V(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))},!1)];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},internalStorage:function(a){var c=[V(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&c.push(va(a));return c},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ba.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",ba.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*b)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=
+Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},tee:function(a){return[V(a,
+["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Y.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},singleArrow:Ba(1),doubleArrow:Ba(.5),folder:function(a){return[V(a,["tabWidth",
+"tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",f.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",f.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",f.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",f.prototype.tabPosition)==
+mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],
+function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))},!1)]},isoCube2:function(a){return[V(a,["isoAngle"],function(a){var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",u.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(c),.5*a.height))},function(a,
+c){this.state.style.isoAngle=Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(.5*a.height,parseFloat(mxUtils.getValue(this.state.style,"size",q.size))));return new mxPoint(a.x,a.y+c)},function(a,c){this.state.style.size=Math.max(0,c.y-a.y)},!0)]},offPageConnector:function(a){return[V(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(B.prototype.size,!0,null,!0,B.prototype.fixedSize),hexagon:Ga(E.prototype.size,!0,.5,!0,E.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(za.prototype.size,!1),cube:La(1,b.prototype.size,!1),card:La(.5,g.prototype.size,!0),loopLimit:La(.5,P.prototype.size,!0),trapezoid:Ma(.5,p.prototype.size,p.prototype.fixedSize),parallelogram:Ma(1,t.prototype.size,t.prototype.fixedSize)};
+Graph.createHandle=V;Graph.handleFactory=Ha;var Ua=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ua.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),Ba=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
+Math.cos(Ba),Math.sin(Ba)),Ba=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(Ba),Math.sin(Ba));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow",
+"horizontal");if(null!=g&&null!=l){a=function(a,c,b){a-=A.x;var f=c-A.y;c=(t*a-p*f)/(m*t-v*p);a=(v*a-m*f)/(v*p-m*t);x?(b&&(A=new mxPoint(A.x+m*c,A.y+v*c),d.push(A)),A=new mxPoint(A.x+p*a,A.y+t*a)):(b&&(A=new mxPoint(A.x+p*a,A.y+t*a),d.push(A)),A=new mxPoint(A.x+m*c,A.y+v*c));d.push(A)};var A=l;null==f&&(f=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(f.x,f.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Va=Graph.prototype.createEdgeHandler;
+Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Va.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,b){a=[];var f=Math.tan(mxUtils.toRadians(30)),d=(.5-f)/2,f=Math.min(c,b/(.5+f));c=(c-f)/2;b=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+f*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c+f,b+.25*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+f,b+.75*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*f,b+(1-d)*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*f));return a};u.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,f=Math.min(c*Math.tan(f),.5*b);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
+a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));return a};y.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(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))];wa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};m.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*b&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};b.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f+b)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-b)));return a};g.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,d)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c-b),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,.25*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(f-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ga.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=
-mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxEllipse.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(c,f/2),d=Math.min(c-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,f));return a};T.prototype.getConstraints=function(a,c,f){c=parseFloat(mxUtils.getValue(a,"jettyWidth",T.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",T.prototype.jettyHeight));var b=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(f-
-.5*a,3.5*a))];f>5*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));f>8*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));f>15*a&&b.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return b};Q.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),
-new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];u.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+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))];ra.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c>=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};b.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)));return a};f.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};L.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;
+la.prototype.constraints=mxEllipse.prototype.constraints;sa.prototype.constraints=mxEllipse.prototype.constraints;qa.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*
+c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));return a};ba.prototype.getConstraints=function(a,c,b){c=parseFloat(mxUtils.getValue(a,"jettyWidth",ba.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",ba.prototype.jettyHeight));var f=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),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,c),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(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-
+.5*a,3.5*a))];b>5*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));b>8*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,c));b>15*a&&f.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return f};P.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),
+new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];W.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)];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)];p.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)];C.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,
+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)];c.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)];l.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)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];S.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)];v.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;n.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;ca.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,
-Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
-null,.75*c+.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b),.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),
-!1,null,.5*(c-b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};O.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),
-!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+b),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(f+d)));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};X.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)];ja.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));return a};M.prototype.getConstraints=function(a,c,f){a=[];var b=f*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",ja.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ja.prototype.arrowSize)))),b=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),
-!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));return a};xa.prototype.getConstraints=function(a,c,f){a=[];var b=Math.min(f,c),d=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),b=(f-d)/2,e=b+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));return a};H.prototype.constraints=null;Y.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)];da.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)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.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)];t.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(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;Y.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,
+Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};ca.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};Ca.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",Z.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Z.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),
+!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};pa.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};N.prototype.constraints=null;ma.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)];aa.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)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),a);null!=a&&d.setSelectionCells(a)}var b=this.editorUi,e=b.editor,d=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey=
-"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,f){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+
+"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(b.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+
"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,
-300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(c){b.handleError(c)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,p=d.view.scale,n=e.x,k=e.y,e=null;if(1==c.length&&a){var q=d.getCellGeometry(c[0]);
-null!=q&&(e=q.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var l=Math.round(d.snap(d.popupMenuHandler.triggerX/p-n)),y=Math.round(d.snap(d.popupMenuHandler.triggerY/p-k));d.cellsMoved(c,l-e.x,y-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
-this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(a=0;a<c.length;a++)if(d.getModel().isVertex(c[a])){var e=d.getCellGeometry(c[a]);null!=e&&(e=e.clone(),e.width=b.copiedSize.width,e.height=b.copiedSize.height,d.getModel().setGeometry(c[a],e))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(c){a(null!=c&&mxEvent.isShiftDown(c))},null,null,"Delete");
-this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(c){b.handleError(c)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
+300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(q){b.handleError(q)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var c=mxClipboard.paste(d);if(null!=c){a=!0;for(var b=0;b<c.length&&a;b++)a=a&&d.model.isEdge(c[b]);var e=d.view.translate,l=d.view.scale,m=e.x,t=e.y,e=null;if(1==c.length&&a){var p=d.getCellGeometry(c[0]);
+null!=p&&(e=p.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(c,a);if(null!=e){var x=Math.round(d.snap(d.popupMenuHandler.triggerX/l-m)),k=Math.round(d.snap(d.popupMenuHandler.triggerY/l-t));d.cellsMoved(c,x-e.x,k-e.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(a=0;a<c.length;a++)if(d.getModel().isVertex(c[a])){var f=d.getCellGeometry(c[a]);null!=f&&(f=f.clone(),f.width=b.copiedSize.width,f.height=b.copiedSize.height,d.getModel().setGeometry(c[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(q){b.handleError(q)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},
null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,
-0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCells();d.model.beginUpdate();try{var f=d.ungroupCells();if(null!=a)for(var b=0;b<a.length;b++)d.model.contains(a[b])&&(0==d.model.getChildCount(a[b])&&d.model.isVertex(a[b])&&d.setCellStyles("container","0",[a[b]]),f.push(a[b]))}finally{d.model.endUpdate()}d.setSelectionCells(f)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});
-this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),f="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");null!=e&&(f=e)}f=new TextareaDialog(b,mxResources.get("editTooltip")+":",f,function(c){d.setTooltipForCell(a,
-c)});b.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),f=d.getLinkForCell(a)||"";b.showLinkDialog(f,mxResources.get("apply"),function(c){c=mxUtils.trim(c);d.setLinkForCell(a,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
-"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,f){a=mxUtils.trim(a);if(0<a.length){var c=null,b=d.getLinkTitle(a);null!=f&&0<f.length&&(c=f[0].iconUrl,b=f[0].name||f[0].type,b=b.charAt(0).toUpperCase()+b.substring(1),30<b.length&&
-(b=b.substring(0,30)+"..."));c=new mxCell(b,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));c.vertex=!0;b=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([c],!0));c.geometry.x=b.x;c.geometry.y=b.y;d.setLinkForCell(c,a);d.cellSizeUpdated(c,!0);d.getModel().beginUpdate();try{c=d.addCell(c),d.fireEvent(new mxEventObject("cellsInserted","cells",[c]))}finally{d.getModel().endUpdate()}d.setSelectionCell(c);
-d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var a=d.getSelectedElement(),f=d.getParentByName(a,"A",d.cellEditor.textarea),e="";if(null==f&&null!=a&&null!=a.getElementsByTagName)for(var m=a.getElementsByTagName("a"),p=0;p<m.length&&null==f;p++)m[p].textContent==a.textContent&&(f=m[p]);null!=f&&"A"==f.nodeName&&(e=f.getAttribute("href")||"",d.selectNode(f));var n=d.cellEditor.saveSelection();
-b.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(a){d.cellEditor.restoreSelection(n);null!=a&&d.insertLink(a)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),p=d.getCellGeometry(b);d.getModel().isVertex(b)&&
-null!=e&&null!=e.text&&null!=p&&d.isWrapping(b)?(p=p.clone(),p.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,p)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),e=0;e<f.length;e++)if(state=d.getView().getState(f[e]),
-null!=state){var m=mxUtils.getValue(state.style,"html","0");if("1"==m&&null==a){var p=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(p=p.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=d.sanitizeHtml(p);p=mxUtils.extractTextWithWhitespace(n.childNodes);d.cellLabelChanged(state.cell,p);d.setCellStyles("html",a,[f[e]])}else"0"==m&&"1"==a&&(p=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,
-"nl2Br","1")&&(p=p.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(p)),d.setCellStyles("html",a,[f[e]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",f))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),f="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",
-function(){var a="0",f=d.getView().getState(d.getSelectionCell());null!=f&&(a=f.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?
-d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),f=d.view.translate,e=d.view.scale;a.x=a.x/e-f.x;a.y=a.y/e-f.y;a.width/=e;a.height/=e;null!=d.backgroundImage&&
-a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),b.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
-a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,f=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/f,(d.container.clientHeight-10)/a.height/f))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
+0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCells();d.model.beginUpdate();try{var c=d.ungroupCells();if(null!=a)for(var b=0;b<a.length;b++)d.model.contains(a[b])&&(0==d.model.getChildCount(a[b])&&d.model.isVertex(a[b])&&d.setCellStyles("container","0",[a[b]]),c.push(a[b]))}finally{d.model.endUpdate()}d.setSelectionCells(c)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});
+this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),c="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");null!=f&&(c=f)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(c){d.setTooltipForCell(a,
+c)});b.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){if(d.isEnabled()&&!d.isSelectionEmpty()){var a=d.getSelectionCell(),c=d.getLinkForCell(a)||"";b.showLinkDialog(c,mxResources.get("apply"),function(c){c=mxUtils.trim(c);d.setLinkForCell(a,0<c.length?c:null)})}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+
+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var b=null,e=d.getLinkTitle(a);null!=c&&0<c.length&&(b=c[0].iconUrl,e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&
+(e=e.substring(0,30)+"..."));b=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=b?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+b:"spacing=10;"));b.vertex=!0;e=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));b.geometry.x=e.x;b.geometry.y=e.y;d.setLinkForCell(b,a);d.cellSizeUpdated(b,!0);d.getModel().beginUpdate();try{b=d.addCell(b),d.fireEvent(new mxEventObject("cellsInserted","cells",[b]))}finally{d.getModel().endUpdate()}d.setSelectionCell(b);
+d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var a=d.getSelectedElement(),c=d.getParentByName(a,"A",d.cellEditor.textarea),f="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var e=a.getElementsByTagName("a"),l=0;l<e.length&&null==c;l++)e[l].textContent==a.textContent&&(c=e[l]);null!=c&&"A"==c.nodeName&&(f=c.getAttribute("href")||"",d.selectNode(c));var m=d.cellEditor.saveSelection();
+b.showLinkDialog(f,mxResources.get("apply"),mxUtils.bind(this,function(a){d.cellEditor.restoreSelection(m);null!=a&&d.insertLink(a)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),l=d.getCellGeometry(b);d.getModel().isVertex(b)&&
+null!=e&&null!=e.text&&null!=l&&d.isWrapping(b)?(l=l.clone(),l.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,l)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var c=d.getSelectionCells(),f=0;f<c.length;f++)if(state=d.getView().getState(c[f]),
+null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==a){var l=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var m=document.createElement("div");m.innerHTML=d.sanitizeHtml(l);l=mxUtils.extractTextWithWhitespace(m.childNodes);d.cellLabelChanged(state.cell,l);d.setCellStyles("html",a,[c[f]])}else"0"==e&&"1"==a&&(l=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,
+"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(l)),d.setCellStyles("html",a,[c[f]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),c="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",
+function(){var a="0",c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?
+d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),c=d.view.translate,f=d.view.scale;a.x=a.x/f-c.x;a.y=a.y/f-c.y;a.width/=f;a.height/=f;null!=d.backgroundImage&&
+a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),b.resetScrollbars()):d.fitWindow(a)},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=
+a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,
(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
-parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",
-mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
-b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
-l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var t=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){t||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){t=!1}),t=!0)}));l=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,
-function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
-a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});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(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
+parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);
+n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);
+n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",
+mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
+b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
+n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(a,c,b,e){return this.addAction(a,
+function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c,a);(c&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(c&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
+a.nodeName&&d.replaceElement(a)}):(c&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var f=0;f<a.length;f++)0==d.model.getChildCount(a[f])&&d.autoSizeCell(a[f],!1)}finally{d.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(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",
function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),f=d.getCurrentCellStyle(a[0]),e="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
-function(){var a=d.view.getState(d.getSelectionCell()),f="1";null!=a&&null!=d.getFoldingImage(a)&&(f="0");d.setCellStyles("collapsible",f);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var f=d.getModel(),f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
-a)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var f=
-e.graph.selectionCellsHandler.getHandler(a);if(f instanceof mxEdgeHandler){for(var b=d.view.translate,m=d.view.scale,p=b.x,b=b.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)p+=n.x,b+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);p=Math.round(d.snap(d.popupMenuHandler.triggerX/m-p));m=Math.round(d.snap(d.popupMenuHandler.triggerY/m-b));f.addPointAt(f.state,p,m)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
-a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var b=a[f];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
-document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");l=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+
-" ("+mxResources.get("url")+"):",f=d.getView().getState(d.getSelectionCell()),e="";null!=f&&(e=f.style[mxConstants.STYLE_IMAGE]||e);var m=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,c,f){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(m),d.insertImage(a,c,f);else{var b=d.getSelectionCells();if(null!=a&&(0<a.length||0<b.length)){var e=null;d.getModel().beginUpdate();try{if(0==b.length){var b=[d.insertVertex(d.getDefaultParent(),null,"",0,0,c,f,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],
-g=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(b,!0));b[0].geometry.x=g.x;b[0].geometry.y=g.y;e=b;d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,b);var p=d.getCurrentCellStyle(b[0]);"image"!=p[mxConstants.STYLE_SHAPE]&&"label"!=p[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",b):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,b);if(1==d.getSelectionCount()&&null!=c&&null!=f){var n=b[0],
-k=d.getModel().getGeometry(n);null!=k&&(k=k.clone(),k.width=c,k.height=f,d.getModel().setGeometry(n,k))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),
-this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.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(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
-Actions.prototype.addAction=function(a,b,e,d,k){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.getCurrentCellStyle(a[0]),f="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,f);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
+function(){var a=d.view.getState(d.getSelectionCell()),c="1";null!=a&&null!=d.getFoldingImage(a)&&(c="0");d.setCellStyles("collapsible",c);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var c=d.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
+a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var c=
+e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,g=d.view.scale,l=b.x,b=b.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)l+=m.x,b+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);l=Math.round(d.snap(d.popupMenuHandler.triggerX/g-l));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-b));c.addPointAt(c.state,l,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
+a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
+document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");n=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+
+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),f="";null!=c&&(f=c.style[mxConstants.STYLE_IMAGE]||f);var e=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(e),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;d.getModel().beginUpdate();try{if(0==f.length){var f=[d.insertVertex(d.getDefaultParent(),null,"",0,0,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],
+l=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;g=f;d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var m=d.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var t=f[0],
+k=d.getModel().getGeometry(t);null!=k&&(k=k.clone(),k.width=c,k.height=b,d.getModel().setGeometry(t,k))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),
+this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.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(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),
+this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};
+Actions.prototype.addAction=function(a,b,e,d,k){var n;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),n=mxResources.get(a)+"..."):n=mxResources.get(a);return this.put(a,new Action(n,b,e,d,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,e,d,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=k;this.visible=!0}
mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.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.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.shadowData=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(l){null!=b&&b(l)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var l=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(l,this.ui.pages):null;var c=[this.ui.diffPages(null!=d?d:l,this.shadowPages)];if(!this.ignorePatches(c)){var f=this.ui.patchPages(l,
-c[0]);d={};var g=this.ui.getHashValueForPages(f,d),l={},m=this.ui.getHashValueForPages(this.shadowPages,l);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",c,"checksum",m==g,g);if(null!=g&&g!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(a.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,c,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(l)+"\nFrom: "+v+"\nTo: "+q+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,D)}}catch(z){}}};
+DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,d):this.reloadFile(a,b))}catch(n){null!=b&&b(n)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,e,d){var k=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),u=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=u&&0<u.length){this.shadowPages=u;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var q=[this.ui.diffPages(null!=d?d:n,this.shadowPages)];if(!this.ignorePatches(q)){var c=this.ui.patchPages(n,
+q[0]);d={};var f=this.ui.getHashValueForPages(c,d),n={},g=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",q,"checksum",g==f,f);if(null!=f&&f!=g){var l=this.compressReportData(this.getAnonymizedXmlForPages(u)),m=this.compressReportData(this.getAnonymizedXmlForPages(c)),t=this.ui.hashValue(a.getCurrentEtag()),p=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,q,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+t+"\nTo: "+p+"\n\nFile Data:\n"+l+"\nPatched Shadow:\n"+m,null,"mergeFile");return}this.patch(q,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(z);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),C=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),C,z)}}catch(D){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var l=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?l(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?l(a):l(null)}),function(){})}else{var t=this.getCurrentUser(),c=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),l=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),c=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf("."),t="xml";0<m&&(t=g.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+c+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+k+"\n\nData:\n"+l,d)}catch(n){}};
-DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),l=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(l,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
+DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var n=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?n(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?n(a):n(null)}),function(){})}else{var u=this.getCurrentUser(),q=null!=u?u.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(c){}}}catch(c){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),u=this.getCurrentUser(),q=null!=u?this.ui.hashValue(u.id):"unknown",c=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",f=this.getTitle(),g=f.lastIndexOf("."),u="xml";0<g&&(u=f.substring(g));var l=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+u+")\nUser="+q+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!=b?"\n\n"+b:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+l+"\n\nShadow:\n"+k+"\n\nData:\n"+n,d)}catch(m){}};
+DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=a&&
a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,l=this.ui.editor.graph;l.container.style.visibility="hidden";var t=this.changeListenerEnabled;this.changeListenerEnabled=!1;var c=l.foldingEnabled,f=l.mathEnabled,g=l.cellRenderer.redraw;l.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());g.apply(this,arguments)};l.model.beginUpdate();try{for(var m=
-0;m<a.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[m],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{l.container.style.visibility="";l.model.endUpdate();l.cellRenderer.redraw=g;this.changeListenerEnabled=t;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)f!=
-l.mathEnabled?(this.ui.editor.updateGraphComponents(),l.refresh()):(c!=l.foldingEnabled?l.view.revalidate():l.view.validate(),l.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,b,e,d,k,l){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),k=e.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var u=this.changeListenerEnabled;this.changeListenerEnabled=!1;var q=n.foldingEnabled,c=n.mathEnabled,f=n.cellRenderer.redraw;n.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());f.apply(this,arguments)};n.model.beginUpdate();try{for(var g=
+0;g<a.length;g++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[g],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{n.container.style.visibility="";n.model.endUpdate();n.cellRenderer.redraw=f;this.changeListenerEnabled=u;e.history=d;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=
+n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(q!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,b,e,d,k,n){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(u){if(null!=e)e(u);else throw u;}};
DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};
DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(a){this.shadowModified=a};DrawioFile.prototype.setModified=function(a){this.shadowModified=this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3022,25 +3022,25 @@ window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources.
k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(a);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),l=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,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,l):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),n=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,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,k):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(k,n):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){var b=null!=a?null!=a.error?a.error.message:a.message:null;null==b&&null!=a&&a.code==App.ERROR_TIMEOUT&&(b=mxResources.get("timeout"));return b};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(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(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&
(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.createSecret=function(a){var b=Editor.guid(32);null!=this.sync?this.sync.createToken(b,mxUtils.bind(this,function(e){a(b,e)}),mxUtils.bind(this,function(){a(b)})):a(b)};
-DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(c){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(c);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,c);else{var l=
-this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,c)}}catch(f){}}};
+DrawioFile.prototype.fileSaved=function(a,b,e,d,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,k)}catch(q){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,q);else{var n=
+this.getCurrentUser(),u=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),u,q)}}catch(c){}}};
DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d,k,l){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=l};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d,k,n){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&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 null==this.fileHandle};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(a){this.desc=a};
LocalFile.prototype.getLatestVersion=function(a,b){null==this.fileHandle?a(null):this.ui.loadFileSystemEntry(this.fileHandle,a,b)};
-LocalFile.prototype.saveFile=function(a,b,e,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var l=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);b=this.getData();var t=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),c=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var b=mxUtils.bind(this,
-function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.desc.lastModified==f.lastModified?a.write(l?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;t()}),b)}),b)}),b):(this.inConflictState=!0,b())}),b)}),b)}}else{if(this.ui.isOfflineApp()||
-this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,l?"image/png":"text/xml",l);else if(c.length<MAX_REQUEST_SIZE){var f=a.lastIndexOf("."),f=0<f?a.substring(f+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(l?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));t()}});l?(k=this.ui.getPngFileProperties(this.ui.fileNode),
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(a)}),d,this.ui.getCurrentFile()!=this?b:null,k.scale,k.border)):c(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",
+LocalFile.prototype.saveFile=function(a,b,e,d,k){a!=this.title&&(this.desc=this.fileHandle=null);this.title=a;k||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);b=this.getData();var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),q=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var b=mxUtils.bind(this,
+function(a){this.savingFile=!1;null!=d&&d({error:a})});this.fileHandle.createWritable().then(mxUtils.bind(this,function(a){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.desc.lastModified==f.lastModified?a.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){a.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(a){this.savingFile=!1;this.desc=a;u()}),b)}),b)}),b):(this.inConflictState=!0,b())}),b)}),b)}}else{if(this.ui.isOfflineApp()||
+this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,a,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(a)+(n?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));u()}});n?(k=this.ui.getPngFileProperties(this.ui.fileNode),
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){q(a)}),d,this.ui.getCurrentFile()!=this?b:null,k.scale,k.border)):q(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"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"}},
@@ -3080,8 +3080,8 @@ c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(
null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,c){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(a.vertices[0])||null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}].concat(Editor.commonProperties);
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## 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## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\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## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var f=0;f<b.length;f++){var d=b[f];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,f){var d=a.state.strokeColor,e=a.state.strokeWidth,g=a.state.strokeAlpha,u=a.state.dashed,m=f.fillWeight;
-0>m&&(m=f.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(f.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(c,b,f);a.setDashed(u);a.setStrokeWidth(e);a.setStrokeColor(d);a.setStrokeAlpha(g)};c._drawToContext=function(a,c,b){a.begin();for(var f=0;f<c.ops.length;f++){var d=c.ops[f],e=d.data;switch(d.op){case "move":a.moveTo(e[0],e[1]);break;case "bcurveTo":a.curveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case "lineTo":a.lineTo(e[0],e[1])}}a.end();"fillPath"===c.type&&
+Editor.createRoughCanvas=function(a){var c=rough.canvas({getContext:function(){return a}});c.draw=function(c){var b=c.sets||[];c=c.options||this.getDefaultOptions();for(var f=0;f<b.length;f++){var d=b[f];switch(d.type){case "path":null!=c.stroke&&this._drawToContext(a,d,c);break;case "fillPath":this._drawToContext(a,d,c);break;case "fillSketch":this.fillSketch(a,d,c)}}};c.fillSketch=function(c,b,f){var d=a.state.strokeColor,e=a.state.strokeWidth,g=a.state.strokeAlpha,l=a.state.dashed,m=f.fillWeight;
+0>m&&(m=f.strokeWidth/2);a.setStrokeAlpha(a.state.fillAlpha);a.setStrokeColor(f.fill||"");a.setStrokeWidth(m);a.setDashed(!1);this._drawToContext(c,b,f);a.setDashed(l);a.setStrokeWidth(e);a.setStrokeColor(d);a.setStrokeAlpha(g)};c._drawToContext=function(a,c,b){a.begin();for(var f=0;f<c.ops.length;f++){var d=c.ops[f],e=d.data;switch(d.op){case "move":a.moveTo(e[0],e[1]);break;case "bcurveTo":a.curveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case "lineTo":a.lineTo(e[0],e[1])}}a.end();"fillPath"===c.type&&
b.filled?a.fill():a.stroke()};return c};(function(){function a(c,b,f){this.canvas=c;this.rc=b;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,a.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,a.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,a.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,a.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,a.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,a.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,a.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,a.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
a.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,a.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,a.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,a.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,a.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,a.prototype.fillAndStroke);
@@ -3091,9 +3091,9 @@ d=null;(b.filled=c)?(b.fill="none"===this.canvas.state.fillColor?"":this.canvas.
e);e=mxUtils.getValue(this.shape.style,"fillWeight",-1);b.fillWeight="auto"==e?-1:e;e=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==e&&(e=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",e=null!=b.fill&&(null!=d||null!=e&&b.fill.toLowerCase()==e.toLowerCase())?"solid":f.fillStyle);b.fillStyle=e;return b};a.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};a.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};a.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=2;a<arguments.length;a+=2)this.lastX=arguments[a-1],this.lastY=arguments[a],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};a.prototype.lineTo=function(a,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,a,c),this.lastX=a,this.lastY=c)};a.prototype.moveTo=
function(a,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,a,c),this.lastX=a,this.lastY=c,this.firstX=a,this.firstY=c)};a.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};a.prototype.quadTo=function(a,c,b,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,a,c,b,f),this.lastX=b,this.lastY=f)};a.prototype.curveTo=function(a,c,b,f,d,e){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,f,d,e),this.lastX=d,this.lastY=e)};a.prototype.arcTo=function(a,c,b,f,d,e,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,f,d,e,g);if(null!=m)for(var u=0;u<m.length;u+=6)this.curveTo(m[u],m[u+1],m[u+2],m[u+3],m[u+4],m[u+5]);this.lastX=e;this.lastY=g}};a.prototype.rect=function(a,c,b,f){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,a,c,b,f,d,e),this.lastX=d,this.lastY=e)};a.prototype.arcTo=function(a,c,b,f,d,e,g){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var l=mxUtils.arcToCurves(this.lastX,this.lastY,a,c,b,f,d,e,g);if(null!=l)for(var m=0;m<l.length;m+=6)this.curveTo(l[m],l[m+1],l[m+2],l[m+3],l[m+4],l[m+5]);this.lastX=e;this.lastY=g}};a.prototype.rect=function(a,c,b,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(a,c,b,f,this.getStyle(!0,!0)))};a.prototype.ellipse=function(a,c,b,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(a+b/2,c+f/2,b,f,this.getStyle(!0,!0)))};a.prototype.roundrect=function(a,c,b,f,d,e){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(a+d,c),this.lineTo(a+b-d,c),this.quadTo(a+b,c,a+b,c+e),this.lineTo(a+
-b,c+f-e),this.quadTo(a+b,c+f,a+b-d,c+f),this.lineTo(a+d,c+f),this.quadTo(a,c+f,a,c+f-e),this.lineTo(a,c+e),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(H){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
+b,c+f-e),this.quadTo(a+b,c+f,a+b-d,c+f),this.lineTo(a+d,c+f),this.quadTo(a,c+f,a,c+f-e),this.lineTo(a,c+e),this.quadTo(a,c,a+d,c))};a.prototype.drawPath=function(a){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),a)}catch(N){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in a)this.nextShape.options[c]=a[c];null==a.stroke&&delete this.nextShape.options.stroke;a.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};a.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};a.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};a.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};a.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;
this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new a(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(a):this.createRoughCanvas(a)};var b=mxShape.prototype.paint;
@@ -3102,10 +3102,10 @@ f||(c.save(),f=this.fill,d=this.stroke,this.stroke=this.fill=null,c.handJiggle.p
a&&"undefined"!==typeof pako){var f=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=f&&0<f.length)for(var e=0;e<f.length;e++)if("mxgraph"==f[e].getAttribute("class")){d.push(f[e]);break}0<d.length&&(f=d[0].getAttribute("data-mxgraph"),null!=f?(d=JSON.parse(f),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(f=mxUtils.getTextContent(d[0]),f=Graph.decompress(f,null,b),0<f.length&&(a=mxUtils.parseXml(f),a=a.documentElement))))}if(null!=
a&&"svg"==a.nodeName)if(f=a.getAttribute("content"),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)a=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(f=a.getElementsByTagName("diagram"),0<f.length&&(d=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=
d&&(a=Editor.parseDiagramNode(d,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),f=null;0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(f=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(b[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),
-b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var m=a.charCodeAt(d),d=d+1;10!=m&&(b+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var u=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(u>d){c=a.substring(d,u);break}}10==m&&("endobj"==
+b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",f=0,d=0,e=[],g=null;d<a.length;){var l=a.charCodeAt(d),d=d+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==f){var m=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(m>d){c=a.substring(d,m);break}}10==l&&("endobj"==
b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==c&&(c=Editor.extractGraphModelFromXref(e));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&
(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(a,b,d){a=f.substring(a+8,a+8+d);"zTXt"==b?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&
-(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(S){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));
+(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(O){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,f=null!=a?a.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(b=c||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0])));
return null!=b?mxUtils.trim(b):b};Editor.addRetryToError=function(a,c){if(null!=a){var b=null!=a.error?a.error:a;null==b.retry&&(b.retry=c)}};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=
a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=a.templateFile);null!=a.styles&&(Editor.styles=a.styles);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=
a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var f=document.getElementsByTagName("script")[0];
@@ -3117,9 +3117,9 @@ c.parentNode){var b=document.createElement("style");b.setAttribute("type","text/
null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||
"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
-c.getAttribute("shadow"),!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(S){console.log("ExtFonts format error: "+S.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
+c.getAttribute("shadow"),!1);if(b=c.getAttribute("extFonts"))try{for(b=b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),f=0;f<b.length;f++)this.graph.addExtFont(b[f].name,b[f].url)}catch(O){console.log("ExtFonts format error: "+O.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,
arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var f=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",
-f.join("|"))}return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(P){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this,
+f.join("|"))}return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this,
arguments)};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
MathJax.Hub,a])},0)};var b=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";c=null!=c?c:{jax:["input/TeX","input/MathML","input/AsciiMath"].concat(["html"==urlParams["math-output"]?"output/HTML-CSS":"output/SVG"]),extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},"HTML-CSS":{availableFonts:[b],imageFont:null},SVG:{font:b,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};
@@ -3128,30 +3128,30 @@ function(){f.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.b
var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=Editor.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,
19)||mxClient.IS_CHROMEAPP||(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};Editor.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){try{var b=!0,f=window.setTimeout(mxUtils.bind(this,function(){b=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(f);b&&c(Editor.createSvgDataUri(a.getText()))}),
-function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(f);if(b)try{var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(ea){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(H){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
-function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var m=a.getElementsByTagName(b),p=0;p<m.length;p++)mxUtils.bind(this,function(b){try{if(null!=b){var m=f.convert(b.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var p=e[m];null==p?(d++,this.convertImageToDataUri(m,function(f){null!=f&&(e[m]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,p)}else null!=m&&b.setAttribute(g,m)}}catch(la){}})(m[p])});b("image","xlink:href");
+function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)});else{var d=new Image;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){window.clearTimeout(f);if(b)try{var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);c(a.toDataURL())}catch(S){c(Editor.svgBrokenImage.src)}};d.onerror=function(){window.clearTimeout(f);b&&c(Editor.svgBrokenImage.src)};d.src=a}}catch(N){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(a,c,b,f){null==f&&(f=this.createImageUrlConverter());var d=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),m=0;m<l.length;m++)mxUtils.bind(this,function(b){try{if(null!=b){var l=f.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var m=e[l];null==m?(d++,this.convertImageToDataUri(l,function(f){null!=f&&(e[l]=f,b.setAttribute(g,f));d--;0==d&&c(a)})):b.setAttribute(g,m)}else null!=l&&b.setAttribute(g,l)}}catch(fa){}})(l[m])});b("image","xlink:href");
b("img","src");0==d&&c(a)};Editor.base64Encode=function(a){for(var c="",b=0,f=a.length,d,e,g;b<f;){d=a.charCodeAt(b++)&255;if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&
3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};
-Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,m){try{var p=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var n=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
-for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+Editor.base64Encode(f)}c(f)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},p,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:n})},m)});n()}catch(W){null!=b&&b(W)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(a,c,b,f,d,e,g,l){try{var m=!g&&(f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();
+for(var f=Array(a.length),d=0;d<a.length;d++)f[d]=String.fromCharCode(a[d]);f=f.join("")}e=null!=e?e:"data:image/png;base64,";f=e+Editor.base64Encode(f)}c(f)}}else null!=b&&(0==a.getStatus()?b({message:mxResources.get("accessDenied")},a):b({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=b&&b({message:mxResources.get("error")+" "+a.getStatus()})},m,this.timeout,function(){d&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:p})},l)});p()}catch(da){null!=b&&b(da)}};Editor.prototype.absoluteCssFonts=
function(a){var c=null;if(null!=a){var b=a.split("url(");if(0<b.length){c=[b[0]];a=window.location.pathname;var f=null!=a?a.lastIndexOf("/"):-1;0<=f&&(a=a.substring(0,f+1));var f=document.getElementsByTagName("base"),d=null;null!=f&&0<f.length&&(d=f[0].getAttribute("href"));for(var e=1;e<b.length;e++)if(f=b[e].indexOf(")"),0<f){var g=Editor.trimCssUrl(b[e].substring(0,f));this.graph.isRelativeUrl(g)&&(g=null!=d?d+g:window.location.protocol+"//"+window.location.hostname+("/"==g.charAt(0)?"":a)+g);
c.push('url("'+g+'"'+b[e].substring(f))}else c.push(b[e])}else c=[a]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(a,c){var b=a.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var d=mxUtils.bind(this,function(){if(0==f){for(var a=[b[0]],d=1;d<b.length;d++){var e=b[d].indexOf(")");a.push('url("');a.push(this.cachedFonts[Editor.trimCssUrl(b[d].substring(0,e))]);a.push('"'+b[d].substring(e))}c(a.join(""))}});if(0<b.length){for(var e=1;e<b.length;e++){var g=b[e].indexOf(")"),
-m=null,p=b[e].indexOf("format(",g);0<p&&(m=Editor.trimCssUrl(b[e].substring(p+7,b[e].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;f++;var c="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
-else if("eot"==m||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;f--;d()}),mxUtils.bind(this,function(a){f--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[e].substring(0,g)),m)}d()}else c(a)};Editor.prototype.loadFonts=
+l=null,m=b[e].indexOf("format(",g);0<m&&(l=Editor.trimCssUrl(b[e].substring(m+7,b[e].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=a;f++;var c="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";
+else if("eot"==l||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;f--;d()}),mxUtils.bind(this,function(a){f--;d()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(b[e].substring(0,g)),l)}d()}else c(a)};Editor.prototype.loadFonts=
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;a()})):a()};Editor.prototype.embedExtFonts=function(a){var c=this.graph.extFonts;if(null!=c&&0<c.length){var b="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(b,a)}),e=0;e<c.length;e++)mxUtils.bind(this,function(a,c){0==c.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[c]?
(f++,this.loadUrl(c,mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;f--;d()}),mxUtils.bind(this,function(a){f--;b+="@import url("+c+");";d()}))):b+=this.cachedGoogleFonts[c]:b+='@font-face {font-family: "'+a+'";src: url("'+c+'");}'})(c[e].name,c[e].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&a[0].appendChild(c[b].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var b=a.getElementsByTagName("defs"),f=a.ownerDocument;0==b.length?(b=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,c);b.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,m,p,n,q,k,v,l,x,y){try{e=null!=e?e:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;v=null!=v?v:0;var u=p?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=f);null==u&&0==p&&(u=y?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,v,l,null,g,null,null,null,n,null,y),mxUtils.bind(this,function(b){try{var f=new Image;
-f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){l.drawImage(f,0,0);a(p)},0):(l.drawImage(f,0,0),a(p))},p=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));m=null!=m?m:1;null!=c&&(m=e?Math.min(1,Math.min(3*c/(4*q),c/n)):c/n);n=Math.ceil(m*n);q=Math.ceil(m*q);p.setAttribute("width",n);p.setAttribute("height",q);var l=p.getContext("2d");null!=u&&(l.beginPath(),l.rect(0,0,n,q),l.fillStyle=u,
-l.fill());l.scale(m,m);if(x){var y=k.view,B=y.scale;y.scale=1;var A=btoa(unescape(encodeURIComponent(y.createSvgGrid(y.gridColor))));y.scale=B;var A="data:image/svg+xml;base64,"+A,t=k.gridSize*y.gridSteps*m,z=k.getGraphBounds(),D=y.translate.x*B,J=y.translate.y*B,H=D+(z.x-D)/B-v,C=J+(z.y-J)/B-v,E=new Image;E.onload=function(){try{for(var a=-Math.round(t-mxUtils.mod((D-H)*m,t)),c=-Math.round(t-mxUtils.mod((J-C)*m,t));a<n;a+=t)for(var b=c;b<q;b+=t)l.drawImage(E,a/m,b/m);g()}catch(sa){null!=d&&d(sa)}};
-E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(ra){null!=d&&d(ra)}});f.onerror=function(a){null!=d&&d(a)};n&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(O){null!=d&&d(O)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(X){null!=d&&d(X)}}))}catch(O){null!=
-d&&d(O)}}),b,q)}catch(R){null!=d&&d(R)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var l=k,t=0;8>t;t++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[k]=l;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=p;p+=c;return a.substring(b,p)}
-function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,p);do{var n=g(a);if("IDAT"==e(a,4)){d=a.substring(0,p-8);"pHYs"==c&&"dpi"==
-b?(b=Math.round(f/.0254),b=m(b)+m(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=m(b.length)+c+b+m(f^4294967295);d+=a.substring(p-8,a.length);break}d+=a.substring(p-8,p-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
-var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&
-(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var 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 a=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=
-!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=n.apply(this,arguments);var c=this.editorUi,
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,c,b,f,d,e,g,l,m,p,t,x,k,n,z,y){try{e=null!=e?e:!0;g=null!=g?g:!0;x=null!=x?x:this.graph;k=null!=k?k:0;var v=m?null:x.background;v==mxConstants.NONE&&(v=null);null==v&&(v=f);null==v&&0==m&&(v=y?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(x.getSvg(null,null,k,n,null,g,null,null,null,p,null,y),mxUtils.bind(this,function(b){try{var f=new Image;
+f.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){n.drawImage(f,0,0);a(m)},0):(n.drawImage(f,0,0),a(m))},m=document.createElement("canvas"),p=parseInt(b.getAttribute("width")),t=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4*t),c/p)):c/p);p=Math.ceil(l*p);t=Math.ceil(l*t);m.setAttribute("width",p);m.setAttribute("height",t);var n=m.getContext("2d");null!=v&&(n.beginPath(),n.rect(0,0,p,t),n.fillStyle=v,
+n.fill());n.scale(l,l);if(z){var A=x.view,y=A.scale;A.scale=1;var C=btoa(unescape(encodeURIComponent(A.createSvgGrid(A.gridColor))));A.scale=y;var C="data:image/svg+xml;base64,"+C,B=x.gridSize*A.gridSteps*l,q=x.getGraphBounds(),u=A.translate.x*y,K=A.translate.y*y,D=u+(q.x-u)/y-k,J=K+(q.y-K)/y-k,N=new Image;N.onload=function(){try{for(var a=-Math.round(B-mxUtils.mod((u-D)*l,B)),c=-Math.round(B-mxUtils.mod((K-J)*l,B));a<p;a+=B)for(var b=c;b<t;b+=B)n.drawImage(N,a/l,b/l);g()}catch(ya){null!=d&&d(ya)}};
+N.onerror=function(a){null!=d&&d(a)};N.src=C}else g()}catch(wa){null!=d&&d(wa)}});f.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(b);this.graph.mathEnabled&&this.addMathCss(b);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(b,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(b))}catch(ca){null!=d&&d(ca)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(b,a),this.loadFonts(g)}catch(R){null!=d&&d(R)}}))}catch(ca){null!=
+d&&d(ca)}}),b,t)}catch(ea){null!=d&&d(ea)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var n=k,u=0;8>u;u++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[k]=n;Editor.updateCRC=function(a,c,b,f){for(var d=0;d<f;d++)a=Editor.crcTable[(a^c.charCodeAt(b+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var c=-1,b=0;b<a.length;b++)c=c>>>8^Editor.crcTable[(c^a.charCodeAt(b))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(a,c,b,f,d){function e(a,c){var b=m;m+=c;return a.substring(b,
+m)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,m);do{var p=g(a);if("IDAT"==e(a,4)){d=a.substring(0,m-8);"pHYs"==c&&
+"dpi"==b?(b=Math.round(f/.0254),b=l(b)+l(b)+String.fromCharCode(1)):b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,c,0,4);f=Editor.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(m-8,a.length);break}d+=a.substring(m-8,m-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";
+var q=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){q.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(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&
+(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var f=Format.prototype.init;Format.prototype.init=function(){f.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 a=this.editorUi.getCurrentFile();
+return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var l=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=l.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=
+!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var m=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=m.apply(this,arguments);var c=this.editorUi,
b=c.editor.graph;if(b.isEnabled()){var f=c.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var d=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});a.appendChild(d)}}if(this.isMathOptionVisible()&&
b.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});d.style.paddingTop="5px";a.appendChild(d);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";d.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
@@ -3177,57 +3177,57 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var f=function(a){if(null!=a)if(b)for(var f=
0;f<a.length;f++)c[a[f].name]=a[f];else for(var d in c){for(var e=!1,f=0;f<a.length;f++)if(a[f].name==d&&a[f].type==c[d].type){e=!0;break}e||delete c[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,f=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],
-c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
-c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
-function(a,c,b){function f(a,c,b,f){u.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],m=b.parentRow.nextSibling;m&&m.getAttribute("data-pName")==a;)g.push(m.getAttribute("data-pValue")),m=m.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(u.setCellStyles(b.countProperty,g.length,u.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}u.setCellStyles(a,
-c,u.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var p=b.dependentPropsDefVal[a],n=b.dependentPropsVals[a];if(n.length>c)n=n.slice(0,c);else for(var k=n.length;k<c;k++)n.push(p);n=n.join(",");u.setCellStyles(b.dependentProps[a],n,u.getSelectionCells());d.push(b.dependentProps[a]);e.push(n)}if("function"==typeof b.onChange)b.onChange(u,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}
-function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,
-function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,m){null!=c&&(c=c.split(","),k.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var p=g,q=0;null!=p.nextSibling;)if(p.nextSibling.getAttribute("data-pName")==
-a)p=p.nextSibling,q++;else break;var u={type:b,parentRow:g,index:q,isDeletable:!0,defVal:d,countProperty:e},q=n(a,"",u,0==q%2,m);f(a,d,u);p.parentNode.insertBefore(q,p.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function m(a,c,b,f,d,e,g){if(0<d){var m=Array(d);c=null!=c?c.split(","):[];for(var p=0;p<d;p++)m[p]=null!=c[p]?c[p]:null!=f?f:"";k.push({name:a,values:m,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
-function p(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function n(c,b,n,u,k){var v=n.dispName,l=n.type,x=document.createElement("tr");x.className="gePropRow"+(k?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);u=!1;null!=n.index&&(x.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",u=!0);var y=document.createElement("td");
-y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));u&&(y.style.textAlign="right");x.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==l)y.appendChild(e(c,b,n));else if("bool"==l||"boolean"==l)y.appendChild(p(c,b,n));else if("enum"==l){var B=n.enumList;for(k=0;k<B.length;k++)if(v=B[k],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var e=
-document.createElement("select");d(y,e);for(var g=0;g<B.length;g++){var m=B[g],p=document.createElement("option");p.value=mxUtils.htmlEntities(m.val);p.innerHTML=mxUtils.htmlEntities(mxResources.get(m.dispName,null,m.dispName));e.appendChild(p)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,n)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==l?y.appendChild(g(c,b,n.subType,n.subDefVal,n.countProperty,
-x,k)):"staticArr"==l?y.appendChild(m(c,b,n.subType,n.subDefVal,n.size,x,k)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(q,function(){function e(){var a=g.value,a=0==a.length&&"string"!=l?0:a;n.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",l="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=n.min&&a<n.min?a=n.min:null!=n.max&&a>n.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className=
-"gePropEditor";"int"!=l&&"float"!=l||n.allowAuto||(g.type="number",g.step="int"==l?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)),null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));n.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(q,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",
-y.appendChild(k));x.appendChild(y);return x}var q=this,u=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;x.appendChild(y);mxUtils.write(x,mxResources.get("property"));
-l.style.cursor="pointer";var B=function(){var c=v.querySelectorAll(".gePropNonHeaderRow"),b;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(pa){}}else y.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(l,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;
-B()});l.appendChild(x);x=document.createElement("th");x.className="gePropHeaderCell";x.innerHTML=mxResources.get("value");l.appendChild(x);v.appendChild(l);var A=!1,t=!1,z;for(z in c)if(l=c[z],"function"!=typeof l.isVisible||l.isVisible(b,this)){var D=null!=b.style[z]?mxUtils.htmlEntities(b.style[z]+""):null!=l.getDefaultValue?l.getDefaultValue(b,this):l.defVal;if("separator"==l.type)t=!t;else{if("staticArr"==l.type)l.size=parseInt(b.style[l.sizeProperty]||c[l.sizeProperty].defVal)||0;else if(null!=
-l.dependentProps){for(var C=l.dependentProps,E=[],J=[],x=0;x<C.length;x++){var G=b.style[C[x]];J.push(c[C[x]].subDefVal);E.push(null!=G?G.split(","):[])}l.dependentPropsDefVal=J;l.dependentPropsVals=E}v.appendChild(n(z,D,l,A,t));A=!A}}for(x=0;x<k.length;x++)for(l=k[x],c=l.parentRow,b=0;b<l.values.length;b++)z=n(l.name,l.values[b],{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:b,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==b%2,l.flipBkg),c.parentNode.insertBefore(z,
-c.nextSibling),c=z;a.appendChild(v);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,f=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
-var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var m=[],p=0;p<this.defaultColorSchemes.length;p++){var n=document.createElement("div");n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight=
-"3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(a)}))})(p);m.push(n);g.appendChild(n)}var q=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;u(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background=
-"#84d7ff"}),u=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{for(var d=f.getSelectionCells(),g=0;g<d.length;g++){for(var m=f.getModel().getStyle(d[g]),p=0;p<e.length;p++)m=mxUtils.removeStylename(m,e[p]);var n=f.getModel().isVertex(d[g])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,
-null)),mxEvent.isAltDown(c)||(m=""==a.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(m=""==a.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!f.getModel().isVertex(d[g])||
-(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[g])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,
-mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[g],m)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage=
+f(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(N){}}};var t=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));t.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},b=a.vertices,f=a.edges,d=0;d<b.length;d++)this.findCommonProperties(b[d],c,0==d);for(d=0;d<f.length;d++)this.findCommonProperties(f[d],
+c,0==b.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,a))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
+c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
+function(a,c,b){function f(a,c,b,f){x.getModel().beginUpdate();try{var d=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=f?g.splice(f,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&(x.setCellStyles(b.countProperty,g.length,x.getSelectionCells()),d.push(b.countProperty),e.push(g.length))}x.setCellStyles(a,
+c,x.getSelectionCells());d.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var m=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var k=p.length;k<c;k++)p.push(m);p=p.join(",");x.setCellStyles(b.dependentProps[a],p,x.getSelectionCells());d.push(b.dependentProps[a]);e.push(p)}if("function"==typeof b.onChange)b.onChange(x,c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",e,"cells",x.getSelectionCells()))}finally{x.getModel().endUpdate()}}
+function d(c,b,f){var d=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-d.x+"px";b.style.top=e.y-d.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(f?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
+function(e){this.editorUi.pickColor(c,function(c){d.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;f(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,c,b,d,e,g,l){null!=c&&(c=c.split(","),k.push({name:a,values:c,type:b,defVal:d,countProperty:e,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var m=g,t=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==
+a)m=m.nextSibling,t++;else break;var x={type:b,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:e},t=p(a,"",x,0==t%2,l);f(a,d,x);m.parentNode.insertBefore(t,m.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,f,d,e,g){if(0<d){var l=Array(d);c=null!=c?c.split(","):[];for(var m=0;m<d;m++)l[m]=null!=c[m]?c[m]:null!=f?f:"";k.push({name:a,values:l,type:b,defVal:f,parentRow:e,flipBkg:g,size:d})}return document.createElement("div")}
+function m(a,c,b){var d=document.createElement("input");d.type="checkbox";d.checked="1"==c;mxEvent.addListener(d,"change",function(){f(a,d.checked?"1":"0",b)});return d}function p(c,b,p,x,k){var v=p.dispName,n=p.type,z=document.createElement("tr");z.className="gePropRow"+(k?"Dark":"")+(x?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",c);z.setAttribute("data-pValue",b);x=!1;null!=p.index&&(z.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",x=!0);var y=document.createElement("td");
+y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));x&&(y.style.textAlign="right");z.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==n)y.appendChild(e(c,b,p));else if("bool"==n||"boolean"==n)y.appendChild(m(c,b,p));else if("enum"==n){var A=p.enumList;for(k=0;k<A.length;k++)if(v=A[k],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var e=
+document.createElement("select");d(y,e);for(var g=0;g<A.length;g++){var l=A[g],m=document.createElement("option");m.value=mxUtils.htmlEntities(l.val);m.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(m)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",function(){var a=mxUtils.htmlEntities(e.value);f(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==n?y.appendChild(g(c,b,p.subType,p.subDefVal,p.countProperty,
+z,k)):"staticArr"==n?y.appendChild(l(c,b,p.subType,p.subDefVal,p.size,z,k)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function e(){var a=g.value,a=0==a.length&&"string"!=n?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",n="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==n?parseInt(a):a)+"");f(c,a,p)}var g=document.createElement("input");d(y,g,!0);g.value=b;g.className=
+"gePropEditor";"int"!=n&&"float"!=n||p.allowAuto||(g.type="number",g.step="int"==n?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));p.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(t,function(a){f(c,"",p,p.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",
+y.appendChild(k));z.appendChild(y);return z}var t=this,x=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding="0";var n=document.createElement("table");n.className="geProperties";n.style.whiteSpace="nowrap";n.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;z.appendChild(y);mxUtils.write(z,mxResources.get("property"));
+v.style.cursor="pointer";var A=function(){var c=n.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(sa){}}else y.src=Sidebar.prototype.expandedImage,b="";for(f=0;f<c.length;f++)c[f].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+A()});v.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");v.appendChild(z);n.appendChild(v);var B=!1,C=!1,q;for(q in c)if(v=c[q],"function"!=typeof v.isVisible||v.isVisible(b,this)){var u=null!=b.style[q]?mxUtils.htmlEntities(b.style[q]+""):null!=v.getDefaultValue?v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)C=!C;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=
+v.dependentProps){for(var D=v.dependentProps,K=[],I=[],z=0;z<D.length;z++){var E=b.style[D[z]];I.push(c[D[z]].subDefVal);K.push(null!=E?E.split(","):[])}v.dependentPropsDefVal=I;v.dependentPropsVals=K}n.appendChild(p(q,u,v,B,C));B=!B}}for(z=0;z<k.length;z++)for(v=k[z],c=v.parentRow,b=0;b<v.values.length;b++)q=p(v.name,v.values[b],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(q,
+c.nextSibling),c=q;a.appendChild(n);A();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var b=this.editorUi,f=b.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
+var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],m=0;m<this.defaultColorSchemes.length;m++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
+"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(m);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;x(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
+"#84d7ff"}),x=mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{for(var d=f.getSelectionCells(),g=0;g<d.length;g++){for(var l=f.getModel().getStyle(d[g]),m=0;m<e.length;m++)l=mxUtils.removeStylename(l,e[m]);var p=f.getModel().isVertex(d[g])?b.initialDefaultVertexStyle:b.initialdefaultEdgeStyle;null!=a?(l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,
+null)),mxEvent.isAltDown(c)||(l=""==a.fill?mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(l=""==a.stroke?mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!f.getModel().isVertex(d[g])||
+(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(l=mxUtils.setStyle(l,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),l=mxUtils.setStyle(l,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),l=mxUtils.setStyle(l,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[g])&&(l=mxUtils.setStyle(l,mxConstants.STYLE_FONTCOLOR,
+mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[g],l)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage=
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(b.initialDefaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=g;c.style.border="1px solid "+m}d.appendChild(c)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
-4)&&mxUtils.br(d),c(a[g])});null==this.format.currentScheme?q("dark"==uiTheme?1:0):q(this.format.currentScheme);var p=10>=this.defaultColorSchemes.length?28:8,k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:"+p+"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(k,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+p+"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&&(a.appendChild(k),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(k);c(v);u(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
+mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(b.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=g;c.style.border="1px solid "+l}d.appendChild(c)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
+4)&&mxUtils.br(d),c(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?28:8,k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"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(k,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"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&&(a.appendChild(k),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(k);c(n);x(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&(b=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft=
"2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var x=Graph.prototype.init;
-Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=a.button,c.relatedTarget=a.relatedTarget}catch(H){}}x.apply(this,arguments);
+Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=a.button,c.relatedTarget=a.relatedTarget}catch(N){}}x.apply(this,arguments);
window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);
if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||
2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,
-"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=D.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
-return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,m,p,n,q,k){var u=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var v=z.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var l=v.ownerDocument,x=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");null!=l.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var y="",B="",A=0;A<this.extFonts.length;A++){var t=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-t+'";\nsrc: url("'+D+'");\n}\n'}x.appendChild(l.createTextNode(y+B));v.getElementsByTagName("defs")[0].appendChild(x)}null!=u&&(this.stylesheet=u,this.refresh());return v};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
-mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
+"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var C=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return C.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=z.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
+return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,m,p,t,x){var k=null;x||null==this.themes||"darkTheme"!=this.defaultThemeName||(k=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
+this.refresh());var n=D.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var v=n.ownerDocument,z=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?z.setAttributeNS("type","text/css"):z.setAttribute("type","text/css");for(var y="",A="",B=0;B<this.extFonts.length;B++){var q=this.extFonts[B].name,C=this.extFonts[B].url;0==C.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+C+");\n":A+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+C+'");\n}\n'}z.appendChild(v.createTextNode(y+A));n.getElementsByTagName("defs")[0].appendChild(z)}null!=k&&(this.stylesheet=k,this.refresh());return n};var I=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=I.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){y.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
-this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
+this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,!0),!1)}finally{this.model.endUpdate()}for(c=
0;c<a.actions.length;c++){var b=a.actions[c],f=[];null!=b.select&&this.isEnabled()&&(f=this.getCellsForAction(b.select),this.setSelectionCells(f));null!=b.highlight&&(f=this.getCellsForAction(b.highlight),this.highlightCells(f,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(f=this.getCellsForAction(b.scroll));null!=b.viewbox&&this.fitWindow(b.viewbox,b.viewbox.border);0<f.length&&this.scrollCellToVisible(f[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=
this.getLinkForCell(c);null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var d=f.getElementsByTagName("a"),e=!1,g=0;g<d.length;g++)b=d[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(d[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(c,f.innerHTML)}};Graph.prototype.updateCustomLink=function(a,
-c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(P){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,
+c){if("data:action/json,"==c.substring(0,17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(T){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var f=c[b];this.updateCustomLinkAction(a,f.toggle);this.updateCustomLinkAction(a,f.show);this.updateCustomLinkAction(a,f.hide);this.updateCustomLinkAction(a,f.select);this.updateCustomLinkAction(a,f.highlight);this.updateCustomLinkAction(a,
f.scroll)}};Graph.prototype.updateCustomLinkAction=function(a,c){if(null!=c&&null!=c.cells){for(var b=[],f=0;f<c.cells.length;f++)if("*"==c.cells[f])b.push(c.cells[f]);else{var d=a[c.cells[f]];null!=d?""!=d&&b.push(d):b.push(c.cells[f])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var f=this.getDefaultParent(),
-c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},m=0;m<a.length;m++)0<a[m].length&&(g[a[m].toLowerCase()]=!0,e++);for(m=0;m<c.length;m++)if(f&&this.model.getParent(c[m])==this.model.root||this.model.isVertex(c[m])||this.model.isEdge(c[m])){var p=null!=
-c[m].value&&"object"==typeof c[m].value?mxUtils.trim(c[m].value.getAttribute(b)||""):"",n=!1;if(0<p.length){if(p=p.toLowerCase().split(" "),p.length>=a.length){for(var q=n=0;q<p.length&&n<e;q++)null!=g[p[q]]&&n++;n=n==e}}else n=0==a.length;n&&d.push(c[m])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();
+c=c.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var d=this.model.getCell(a[b]);null!=d&&c.push(d)}return c};Graph.prototype.getCellsForTags=function(a,c,b,f){var d=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<c.length;l++)if(f&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var m=null!=
+c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)||""):"",p=!1;if(0<m.length){if(m=m.toLowerCase().split(" "),m.length>=a.length){for(var t=p=0;t<m.length&&p<e;t++)null!=g[m[t]]&&p++;p=p==e}}else p=0==a.length;p&&d.push(c[l])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();
try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,c,b,f){for(var d=0;d<a.length;d++)this.highlightCell(a[d],c,b,f)};Graph.prototype.highlightCell=function(a,c,b,f){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,d,!1);null!=f&&(e.opacity=f);e.highlight(a);window.setTimeout(function(){null!=
e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition","all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");
e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",this.svgShadowBlur);e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");
@@ -3244,423 +3244,425 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
[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.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(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,c,b,f,d,e,g,m,p,n){if(null!=b&&null==mxMarker.markers[b]){var q=this.getPackageForType(b);null!=q&&mxStencilRegistry.getStencil(q)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,Math.min(m,Math.max(parseInt(l.value),parseInt(v.value))));v.value=Math.max(1,Math.min(m,Math.min(parseInt(l.value),parseInt(v.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,m=c.currentTranslate,n=c.currentScale,p=c.view.translate,q=
-c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var k=c.getGraphBounds(),v=0,l=0,u=ba.get(),x=1/c.pageScale,t=A.checked;if(t)var x=parseInt(J.value),z=parseInt(Q.value),x=Math.min(u.height*z/(k.height/c.view.scale),u.width*x/(k.width/c.view.scale));else x=parseInt(y.value)/(100*c.pageScale),isNaN(x)&&(f=1/c.pageScale,y.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*
-f);u.height=Math.ceil(u.height*f);x*=f;!t&&c.pageVisible?(k=c.getPageLayout(),v-=k.x*u.width,l-=k.y*u.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,x,u,0,v,l,t);b.pageSelector=!1;b.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(b.title=v.getTitle());var D=b.writeHead;b.writeHead=function(b){D.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
-null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
-b.renderPage;b.renderPage=function(c,b,f,d,e,g){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}v=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(v=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=v&&(d.stylesheet=v,d.refresh())}else{u=
-c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";b.backgroundColor=u;b.autoOrigin=t;b.appendGraph(c,x,v,l,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)v=c.extFonts[e].name,l=c.extFonts[e].url,0==l.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+l+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+l+'");\n}'),
-b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=m,c.currentScale=n,c.view.translate=p,c.view.scale=q);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=v.value,m=l.value,n=!q.checked,k=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,q.checked,g,m,A.checked,J.value,Q.value,parseInt(y.value)/100,parseInt(ma.value)/
-100,ba.get());else{n&&(n=g==p&&m==p);if(!n&&null!=a.pages&&a.pages.length){var u=0,n=a.pages.length-1;q.checked||(u=parseInt(g)-1,n=parseInt(m)-1);for(var x=u;x<=n;x++){var t=a.pages[x],g=t==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),m=!0,u=!1,z=null,D=null;null==t.viewState&&null==t.root&&a.updatePageRoot(t);null!=t.viewState&&(m=t.viewState.pageVisible,u=t.viewState.mathEnabled,z=t.viewState.background,D=t.viewState.backgroundImage,g.extFonts=t.viewState.extFonts);
-g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=m;g.mathEnabled=u;var B=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?t.getName():"pagenumber"==c?x+1:"pagecount"==c?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(t);g.model.setRoot(t.root)}k=b(g,k,x!=n);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=b(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
-(k.mathEnabled&&(n=k.wnd.document,c&&(k.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),k.closeDocument(),!k.mathEnabled&&c&&PrintDialog.printPreview(k));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var m=1,p=1,n=
-document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var k=q.cloneNode(!0);q.setAttribute("checked","checked");
-k.setAttribute("value","range");n.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var 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";n.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var l=v.cloneNode(!0);n.appendChild(l);mxEvent.addListener(v,"focus",
-function(){k.checked=!0});mxEvent.addListener(l,"focus",function(){k.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(l,"change",b);if(null!=a.pages&&(m=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+1;v.value=p;l.value=p;break}v.setAttribute("max",m);l.setAttribute("max",m);a.isPagesEnabled()?1<m&&(e.appendChild(n),k.checked=!0):k.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var x=document.createElement("input");
-x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");u.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));u.appendChild(g);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";u.appendChild(y);mxEvent.addListener(y,"focus",function(){x.checked=!0});e.appendChild(u);var n=n.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value",
-"fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(A);n.appendChild(g);u=document.createElement("table");u.style.display="inline-block";var t=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),K=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign=
-"right";mxUtils.write(C,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";E.appendChild(J);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var Q=J.cloneNode(!0);I.appendChild(Q);mxEvent.addListener(J,"focus",function(){A.checked=!0});mxEvent.addListener(Q,
-"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));K.appendChild(g);z.appendChild(C);z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(K);t.appendChild(z);t.appendChild(D);u.appendChild(t);n.appendChild(u);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);
-g=document.createElement("div");g.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="60px";n.appendChild(ma);e.appendChild(n);g=document.createElement("div");g.style.cssText=
-"text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",g.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),u.className="geBtn",g.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
-"print":"ok"),function(){a.hideDialog();f(!0)});u.className="geBtn gePrimaryBtn";g.appendChild(u);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
+[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var E=mxMarker.createMarker;mxMarker.createMarker=
+function(a,c,b,f,d,e,g,l,m,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return E.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){n.value=Math.max(1,Math.min(l,Math.max(parseInt(n.value),parseInt(k.value))));k.value=Math.max(1,Math.min(l,Math.min(parseInt(n.value),parseInt(k.value))))}function f(c){function b(c,b,e){var g=c.useCssTransforms,l=c.currentTranslate,m=c.currentScale,p=c.view.translate,t=
+c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var x=c.getGraphBounds(),k=0,n=0,z=ia.get(),y=1/c.pageScale,q=B.checked;if(q)var y=parseInt(G.value),C=parseInt(P.value),y=Math.min(z.height*C/(x.height/c.view.scale),z.width*y/(x.width/c.view.scale));else y=parseInt(v.value)/(100*c.pageScale),isNaN(y)&&(f=1/c.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*
+f);z.height=Math.ceil(z.height*f);y*=f;!q&&c.pageVisible?(x=c.getPageLayout(),k-=x.x*z.width,n-=x.y*z.height):q=!0;if(null==b){b=PrintDialog.createPrintPreview(c,y,z,0,k,n,q);b.pageSelector=!1;b.mathEnabled=!1;k=a.getCurrentFile();null!=k&&(b.title=k.getTitle());var u=b.writeHead;b.writeHead=function(b){u.apply(this,arguments);mxClient.IS_GC&&(b.writeln('<style type="text/css">'),b.writeln("@media print {"),b.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),b.writeln("}"),b.writeln("</style>"));
+null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var A=
+b.renderPage;b.renderPage=function(c,b,f,d,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=A.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=k&&(d.stylesheet=k,d.refresh())}else{z=
+c.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=q;b.appendGraph(c,y,k,n,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)k=c.extFonts[e].name,n=c.extFonts[e].url,0==n.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+n+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+n+'");\n}'),
+b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(la.value)/100;isNaN(f)&&(f=1,la.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,x=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,g,l,B.checked,G.value,P.value,parseInt(v.value)/100,parseInt(la.value)/
+100,ia.get());else{p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var z=0,p=a.pages.length-1;t.checked||(z=parseInt(g)-1,p=parseInt(l)-1);for(var y=z;y<=p;y++){var q=a.pages[y],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,z=!1,C=null,u=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,z=q.viewState.mathEnabled,C=q.viewState.background,u=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);
+g.background=C;g.backgroundImage=null!=u?new mxImage(u.src,u.width,u.height):null;g.pageVisible=l;g.mathEnabled=z;var A=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?q.getName():"pagenumber"==c?y+1:"pagecount"==c?null!=a.pages?a.pages.length:1:A.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}x=b(g,x,y!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else x=b(d);null==x?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
+(x.mathEnabled&&(p=x.wnd.document,c&&(x.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),x.closeDocument(),!x.mathEnabled&&c&&PrintDialog.printPreview(x));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,m=1,p=
+document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var x=t.cloneNode(!0);t.setAttribute("checked","checked");
+x.setAttribute("value","range");p.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type","number");k.setAttribute("min","1");k.style.width="50px";p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var n=k.cloneNode(!0);p.appendChild(n);mxEvent.addListener(k,"focus",
+function(){x.checked=!0});mxEvent.addListener(n,"focus",function(){x.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(n,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+1;k.value=m;n.value=m;break}k.setAttribute("max",l);n.setAttribute("max",l);a.isPagesEnabled()?1<l&&(e.appendChild(p),x.checked=!0):x.checked=!0;var z=document.createElement("div");z.style.marginBottom="10px";var y=document.createElement("input");
+y.style.marginRight="8px";y.setAttribute("value","adjust");y.setAttribute("type","radio");y.setAttribute("name","printZoom");z.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));z.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";z.appendChild(v);mxEvent.addListener(v,"focus",function(){y.checked=!0});e.appendChild(z);var p=p.cloneNode(!1),B=y.cloneNode(!0);B.setAttribute("value",
+"fit");y.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(B);p.appendChild(g);z=document.createElement("table");z.style.display="inline-block";var C=document.createElement("tbody"),q=document.createElement("tr"),u=q.cloneNode(!0),D=document.createElement("td"),I=D.cloneNode(!0),E=D.cloneNode(!0),F=D.cloneNode(!0),K=D.cloneNode(!0),H=D.cloneNode(!0);D.style.textAlign="right";F.style.textAlign=
+"right";mxUtils.write(D,mxResources.get("fitTo"));var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";I.appendChild(G);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));E.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var P=G.cloneNode(!0);K.appendChild(P);mxEvent.addListener(G,"focus",function(){B.checked=!0});mxEvent.addListener(P,
+"focus",function(){B.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));H.appendChild(g);q.appendChild(D);q.appendChild(I);q.appendChild(E);u.appendChild(F);u.appendChild(K);u.appendChild(H);C.appendChild(q);C.appendChild(u);z.appendChild(C);p.appendChild(z);e.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);
+g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="60px";p.appendChild(la);e.appendChild(p);g=document.createElement("div");g.style.cssText=
+"text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||(z=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),z.className="geBtn",g.appendChild(z));PrintDialog.previewEnabled&&(z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),z.className="geBtn",g.appendChild(z));z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
+"print":"ok"),function(){a.hideDialog();f(!0)});z.className="geBtn gePrimaryBtn";g.appendChild(z);a.editor.cancelFirst||g.appendChild(p);e.appendChild(g);this.container=e};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&
(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(F.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 I=document.createElement("canvas"),K=new Image;K.onload=function(){try{I.getContext("2d").drawImage(K,0,0);var a=I.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(J){}};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(u){}})();
+this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),G=new Image;G.onload=function(){try{H.getContext("2d").drawImage(G,0,0);var a=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};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(v){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,d,e,p,n,k){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
--1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(a);(new Image).src=c+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(x){}try{k||
-null==window.console||console.error(n,a,b,d,e,p)}catch(x){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
+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(a,b,d,e,m,t,p){t=null!=t?t:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
+-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(a);(new Image).src=c+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(C){}try{p||
+null==window.console||console.error(t,a,b,d,e,m)}catch(C){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=
null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=
e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml=
'<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.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;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(p){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{b=
-document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=
+document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
-c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
-EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var p=mxUtils.parseXml(c),n=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(v){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
-function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(d[e]));
-null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,p,n,k,q,l,y,t){b=null!=b?b:this.editor.graph;p=null!=p?p:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(t){var m=a.ownerDocument.createElement("diagram");m.setAttribute("id",
-Editor.guid());m.appendChild(a)}else{m=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(m);if(Graph.decompress(g)!=m)return m;m=a.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(m)}y?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),
-g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),
-a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));t=t?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!p&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))t=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||!p&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),t=this.getEmbeddedSvg(t,b,
-e,null,q,l,f);return t};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):
-(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
+EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=b.getFunction,e=this.editor.graph,m=this;b.getFunction=function(a){if(e.isSelectionEmpty()&&null!=
+m.pages&&0<m.pages.length){var c=m.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<c&&m.movePage(c,c-1)};if(38==a.keyCode)return function(){0<c&&m.movePage(c,0)};if(39==a.keyCode)return function(){c<m.pages.length-1&&m.movePage(c,c+1)};if(40==a.keyCode)return function(){c<m.pages.length-1&&m.movePage(c,m.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<c&&m.selectNextPage(!1)};if(38==
+a.keyCode)return function(){0<c&&m.selectPage(m.pages[0])};if(39==a.keyCode)return function(){c<m.pages.length-1&&m.selectNextPage(!0)};if(40==a.keyCode)return function(){c<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return d.apply(this,arguments)}}return b};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var d=a.indexOf("&lt;mxfile ");if(0<=d){var e=a.lastIndexOf("&lt;/mxfile&gt;");
+e>d&&(c=a.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(a),t=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=t?mxUtils.getXml(t):""}catch(p){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));
+a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
+this.pages:[];for(var e=d.length-1;0<=e;e--){var t=this.updatePageRoot(new DiagramPage(d[e]));null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,t,0==e?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,
+this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,t,p,x,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=
+g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),
+g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),
+g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!t&&!m&&(p||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(t||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&
+d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,e,null,x,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
+null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][c].data=
-n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
+/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(t){a[EditorUi.DIFF_INSERT][c].data=
+t.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=
0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),f=0;f<c.length;f++)null!=c[f].getAttribute("value")&&c[f].setAttribute("value","["+c[f].getAttribute("value").length+"]"),null!=c[f].getAttribute("xmlValue")&&c[f].setAttribute("xmlValue","["+c[f].getAttribute("xmlValue").length+"]"),null!=c[f].getAttribute("style")&&c[f].setAttribute("style","["+c[f].getAttribute("style").length+"]"),null!=
c[f].parentNode&&"root"!=c[f].parentNode.nodeName&&null!=c[f].parentNode.parentNode&&(c[f].setAttribute("id",c[f].parentNode.getAttribute("id")),c[f].parentNode.parentNode.replaceChild(c[f],c[f].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),
-this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,p,n,k,q,l,y){p=null!=p?p:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=l&&/(\.svg)$/i.test(l.getTitle()))if(y=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(p,n,y);l=null!=l?l:this.getCurrentFile();a=this.createFileData(k,c,l,window.location.href,a,b,d,e,p,q,y);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);
-return a};EditorUi.prototype.getHtml=function(a,b,d,e,p,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==p&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=p&&(p=p.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));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!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+f+'">\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(a,b,d,e,p){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==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!=d?"<title>"+mxUtils.htmlEntities(d)+"</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(a))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+b+'">\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(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
+this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,m,t,p,x,k,n){m=null!=m?m:!0;t=null!=t?t:!1;var c=this.editor.graph;if(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))if(n=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}p=null!=p?p:this.getXmlFileData(m,t,n);k=null!=k?k:this.getCurrentFile();a=this.createFileData(p,c,k,window.location.href,a,b,d,e,m,x,n);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);
+return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,t){t=null!=t?t:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=t?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;t=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+"/embed.js?s="+b));a.setAttribute("x0",t);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:
null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),d=0;d<k.length;d++){var q=k[d];n.setVisible(q,a[q.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,p,n,k,q,l,y,t){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!p),
-f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,p,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;
-null!=n&&(this.editor.graph.pageVisible=n);var d=this.createDownloadRequest(c,a,e,b,k,p,q,l,y,t);this.editor.graph.pageVisible=f;return d}catch(P){this.handleError(P)}}));else{var m=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
-null;var D=this.editor.graph.getSvg(x,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=
-function(a,b,d,e,p,n,k,q,l,y){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",m="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==b&&0==n&&(m="&allPages=1");if("xmlpng"==b&&(y="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"!=b&&"pdf"!=b||!p?p||
-null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;p={globalVars:c.getExportVariables()};l&&(p.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+y+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=k?"&scale="+k:"")+(null!=q?"&border="+q:""))};EditorUi.prototype.setMode=function(a,
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var t=this.editor.graph.getModel(),p=t.getChildren(t.root),d=0;d<p.length;d++){var k=p[d];t.setVisible(k,a[k.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
+this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(a,b,d,e,m,t,p,k,n,z,q){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!m),
+f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,m,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;
+null!=t&&(this.editor.graph.pageVisible=t);var d=this.createDownloadRequest(c,a,e,b,p,m,k,n,z,q);this.editor.graph.pageVisible=f;return d}catch(O){this.handleError(O)}}));else{var l=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(l)}))});if("svg"==a){var u=this.editor.graph.background;if(p||u==mxConstants.NONE)u=
+null;var C=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(C);this.editor.convertImages(C,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",l=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(v){this.handleError(v)}};EditorUi.prototype.createDownloadRequest=
+function(a,b,d,e,m,t,p,k,n,z){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==t?!1:"xmlpng"!=b);var g="",l="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};z=z?"1":"0";"pdf"==b&&0==t&&(l="&allPages=1");if("xmlpng"==b&&(z="1",b="png",null!=this.pages&&null!=this.currentPage))for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){g="&from="+t;break}t=c.background;"png"!=b&&"pdf"!=b||!m?m||
+null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;m={globalVars:c.getExportVariables()};n&&(m.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+l+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+e+"&embedXml="+z+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=p?"&scale="+p:"")+(null!=k?"&border="+k:""))};EditorUi.prototype.setMode=function(a,
b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(f){var d=null!=a.data?a.data:"";null!=f&&0<f.length&&(0<d.length&&(d+="\n"),d+=f);f=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return c};this.fileLoaded(f);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,m=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
-n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(m,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();m()}));n();m()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=
-new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var q=n.getCell(a.getAttribute("id"));if(null!=q){try{var l=a.getAttribute("value");if(null!=l){var y=
-mxUtils.parseXml(l).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))n.setValue(q,y);else for(var t=y.attributes,z=0;z<t.length;z++)e.setAttributeForCell(q,t[z].nodeName,0<t[z].nodeValue.length?t[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+q.id+": "+u)}try{var E=a.getAttribute("style");null!=E&&e.model.setStyle(q,E)}catch(u){null!=window.console&&console.log("Error in style for "+q.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var C=
-0<A.length?JSON.parse(A):null;null!=C&&C.append||e.removeCellOverlays(q);null!=C&&e.addCellOverlay(q,c(C))}}catch(u){null!=window.console&&console.log("Error in icon for "+q.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=e.getCellGeometry(q);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}e.model.setGeometry(q,F)}}}catch(u){null!=window.console&&
-console.log("Error in icon for "+q.id+": "+u)}}}else if("model"==a.nodeName){for(var K=a.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=K.nextSibling;null!=K&&(new mxCodec(a.firstChild)).decode(K,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),k=e.getMonth()+1,q=e.getDate(),l=e.getHours(),y=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+k+"-"+q+"-"+l+"-"+y+"-"+e));
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+m=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();l()}));m();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.editor.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=
+new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,t=e.getModel();t.beginUpdate();var p=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=t.getCell(a.getAttribute("id"));if(null!=k){try{var n=a.getAttribute("value");if(null!=n){var z=
+mxUtils.parseXml(n).documentElement;if(null!=z)if("1"==z.getAttribute("replace-value"))t.setValue(k,z);else for(var q=z.attributes,u=0;u<q.length;u++)e.setAttributeForCell(k,q[u].nodeName,0<q[u].nodeValue.length?q[u].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var y=a.getAttribute("style");null!=y&&e.model.setStyle(k,y)}catch(K){null!=window.console&&console.log("Error in style for "+k.id+": "+K)}try{var B=a.getAttribute("icon");if(null!=B){var E=
+0<B.length?JSON.parse(B):null;null!=E&&E.append||e.removeCellOverlays(k);null!=E&&e.addCellOverlay(k,c(E))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var F=a.getAttribute("geometry");if(null!=F){var F=JSON.parse(F),H=e.getCellGeometry(k);if(null!=H){H=H.clone();for(key in F){var G=parseFloat(F[key]);"dx"==key?H.x+=G:"dy"==key?H.y+=G:"dw"==key?H.width+=G:"dh"==key?H.height+=G:H[key]=parseFloat(F[key])}e.model.setGeometry(k,H)}}}catch(K){null!=window.console&&
+console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var v=a.firstChild;null!=v&&v.nodeType!=mxConstants.NODETYPE_ELEMENT;)v=v.nextSibling;null!=v&&(new mxCodec(a.firstChild)).decode(v,t)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(p=a.hasAttribute("max-scale")?
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{t.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,f="",d=c.lastIndexOf(".");0<=d&&(f=c.substring(d),c=c.substring(0,d));if(b)var e=new Date,d=e.getFullYear(),p=e.getMonth()+1,k=e.getDate(),n=e.getHours(),z=e.getMinutes(),e=e.getSeconds(),c=c+(" "+(d+"-"+p+"-"+k+"-"+n+"-"+z+"-"+e));
return c=mxResources.get("copyOf",[c])+f};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var f=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(q){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(v,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
-0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");f.root=a[e].root;var q=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,q,!0);q.removeAttribute("pageWidth");q.removeAttribute("pageHeight");k.appendChild(q);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,f){return!f||"mxGeometry"!=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){this.fileLoadedError=p;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+p.message,label:"stack_"+p.stack})}catch(x){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?e():this.handleError(p,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else d();return f};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,f=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
+0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var p=a[e].node.cloneNode(!1);p.removeAttribute("name");f.root=a[e].root;var k=d.encode(f);this.editor.graph.saveViewState(a[e].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");p.appendChild(k);null!=b&&(b.eltCount+=p.getElementsByTagName("*").length,b.nodeCount+=p.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(p,function(a,c,b,f){return!f||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?f&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,d,e,p,n,k){};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(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
+function(a,b,d,e,m,k,p){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),
b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};
-EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var f=JSON.parse(mxUtils.getTextContent(c.documentElement));
-this.libraryLoaded(a,f,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
-null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var m=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var k=m.parentNode.previousSibling;e=k.getAttribute("title");
-null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top="0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");k.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");
-t.setAttribute("border","0");t.style.cursor="pointer";t.style.margin="0 3px";var z=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=z?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var E=this.editor.graph,A=null,
-C=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=t.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",l.insertBefore(A,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*l.childNodes.length+"px")})):null==z&&(z=t.cloneNode(!1),z.setAttribute("src",IMAGE_PATH+"/download.png"),z.setAttribute("title",mxResources.get("save")),l.insertBefore(z,l.firstChild),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==z||a.isModified()||(k.style.paddingRight=18*l.childNodes.length+
-"px",z.parentNode.removeChild(z),z=null)});mxEvent.consume(c)})),k.style.paddingRight=18*l.childNodes.length+"px")}),F=mxUtils.bind(this,function(a,c,d,e){a=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var n=E.getCellGeometry(a[g]);null!=n&&n.translate(-c.x,-c.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
-(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(a),E.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=E.getSelectionCells(),b=E.view.getBounds(c),f=E.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=E.view.translate.x;b.y-=E.view.translate.y;
-F(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(m.style.backgroundColor=
-"",m.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
-function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,n,p,k,q,l,v){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,k),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,p,k),a,mxEvent.isAltDown(a)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var u=!1,x=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var n=
-JSON.parse(mxUtils.getTextContent(e.documentElement));g(n,m);b=b.concat(n);G(a);this.spinner.stop();u=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),n=0;n<p.length;n++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[n])),q=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,q.width,q.height),a)}u=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(v,function(a){x(a,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,q)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));l.insertBefore(t,l.firstChild);mxEvent.addListener(t,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
-m&&C(a)});e=t.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));l.insertBefore(e,l.firstChild);mxEvent.addListener(e,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),l.insertBefore(e,l.firstChild))}k.appendChild(l);k.style.paddingRight=18*l.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var f=a[c],d=f.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(d=this.stringToCells(Graph.decompress(f.xml)),
-0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.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=mxClient.IS_QUIRKS?
+EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));
+this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
+null,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var k=l.parentNode.previousSibling;e=k.getAttribute("title");
+null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(n.style.backgroundColor="inherit");k.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle");
+q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var u=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var y=this.editor.graph,B=null,
+E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=q.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",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==u&&(u=q.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),n.insertBefore(u,n.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==u||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
+"px",u.parentNode.removeChild(u),u=null)});mxEvent.consume(c)})),k.style.paddingRight=18*n.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,e){a=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var m=y.getCellGeometry(a[g]);null!=m&&m.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
+(a.title=e);b.push(a);F(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),G=mxUtils.bind(this,function(a){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(a),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=y.getSelectionCells(),b=y.view.getBounds(c),d=y.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=y.view.translate.x;b.y-=y.view.translate.y;
+H(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.first&&(y.graphHandler.suspend(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),l.style.backgroundColor="#f1f3f4",l.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&(l.style.backgroundColor=
+"",l.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){y.isMouseDown&&null!=y.graphHandler.first&&(y.graphHandler.resume(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),l.style.backgroundColor="",l.style.cursor="",y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,
+function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,p,k,t,x,n){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,k),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,p,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var z=!1,y=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);F(a);this.spinner.stop();z=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[m])),t=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,t.width,t.height),a)}z=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=n&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(n,function(a){y(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=n?this.parseFile(n,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?y(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):y(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==
+l&&E(a)});e=q.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",G);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),n.insertBefore(e,n.firstChild))}k.appendChild(n);k.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],f=d.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(f=this.stringToCells(Graph.decompress(d.xml)),
+0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.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=mxClient.IS_QUIRKS?
"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
"black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,p){a=new ImageDialog(this,a,b,d,e,p);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,p){a=new LibraryDialog(this,a,b,d,e,p);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
-function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?
+480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a,c){if(!c){var b=new ChangePageSetup(this,null,a);b.ignoreColor=!0;this.editor.graph.model.execute(b)}});var c=new BackgroundImageDialog(this,a,b);this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,640,440,!0,!1,mxUtils.bind(this,
+function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position="absolute";a.style.overflow=
"hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));
-a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,p,n,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(A){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
-m=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),m=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.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 l=null!=n?n:window.location.hash;
-if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){l="#U"==l.substring(0,2)?l.substring(45,l.lastIndexOf("%26ex")):l.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
-l);this.handleError(a,b,d,e,p)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;d.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");d.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;
-d.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("changeUser")+": ");b.appendChild(f);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var b=d.value,f=c.length!=b;f&&this.drive.setUser(c[b]);this.drive.authorize(f,mxUtils.bind(this,function(){f||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
-!0)}));b.appendChild(d);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,d,m,null,null,n,v,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,e,
-p,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,p,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var f=document.createElement("div");
+a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,m,k,p){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=f||null!=b){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),
+l=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),l=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var t=null!=k?k: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!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){t="#U"==t.substring(0,2)?t.substring(45,t.lastIndexOf("%26ex")):t.substring(2);this.showError(b,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+
+t);this.handleError(a,b,d,e,m)}),l,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;
+f.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var b=f.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
+!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?p=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):
+f.code==App.ERROR_BUSY&&(p=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=k=null;null!=f&&null!=f.helpLink&&(k=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,p,g,d,l,null,null,k,n,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,b,d,e,
+m,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,k);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var f=document.createElement("div");
f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn";c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+
"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(c);mxUtils.write(f,b);document.body.appendChild(f);
this.bannerShowing=!0;var e=document.createElement("div");e.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";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b);f.style.paddingBottom="30px";f.appendChild(e);var k=mxUtils.bind(this,
-function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var l=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(f,"click",
-mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b?(null!=d&&d(),k(),mxEvent.consume(a)):l()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(l,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
-EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,p){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,p);this.saveData(e,c,a.substring(a.lastIndexOf(",")+
+function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(f,"click",
+mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b?(null!=d&&d(),k(),mxEvent.consume(a)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};
+EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=function(a,b,d,e,m){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,m);this.saveData(e,c,a.substring(a.lastIndexOf(",")+
1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,
-620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,p,n){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||(b=b+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
-!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){c.href=URL.createObjectURL(e?
-this.base64ToBlob(a,d):new Blob([a],{type:d}));n?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(x){}}else this.createEchoRequest(a,b,d,e,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,p,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=p?"&format="+p:"")+(null!=n?"&base64="+
-n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),f=c.length,d=Math.ceil(f/1024),e=Array(d),k=0;k<d;++k){for(var q=1024*k,l=Math.min(q+1024,f),y=Array(l-q),t=0;q<l;++t,++q)y[t]=c[q].charCodeAt(0);e[k]=new Uint8Array(y)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,p,n,k,q){n=null!=n?n:!1;k=null!=k?k:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(n);
-isLocalStorage&&p++;var c=4>=p?2:6<p?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e,null,q):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,
-c,d,e,b,f)}catch(A){this.handleError(A)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<p,c,a,d,e);n=this.isServices(p)?p>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+
-a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,
-"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var f=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";
-this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var d=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});d.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){d.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",
-mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,p){this.isLocalFileSave()?this.saveLocalFile(d,a,e,p,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,p,b,c)}),d,p,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,p,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
-function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,n,!0,c,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,f,e,n,p);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,p,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,p,n,k,q,l,y,t){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f=t?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(f,a,k,q,null,d,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!0,t);e&&this.editor.graph.addSvgShadow(g);var m=this.getBaseFilename()+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();p&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,l,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
-c.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,v,this.thumbImageCache)):v(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,b,d,e,p,n,k){return this.addCheckbox(a,
-d,e,p,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,p,n,k,q){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=k;null!=q&&c.setAttribute("name",q);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,b),d.setAttribute("for",k),a.appendChild(d),
-p||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,
-mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));
-mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":d:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+
-e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value",
-"blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=null,k=mxUtils.button("",
-mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createUrlParameters=
-function(a,b,d,e,p,n,k){k=null!=k?k:[];e&&("1"==urlParams.dev&&k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=b&&b!=mxConstants.NONE&&k.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=p&&0<p.length&&k.push("edit="+encodeURIComponent(p)),n&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,
-b,d,e,p,n,k,l,x){x=null!=x?x:this.createUrlParameters(a,b,d,e,p,n);a=this.getCurrentFile();b=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),l||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(a.getTitle()));return(e&&
-"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,p,n,k,l,x,y,t){this.getBasenames();var c={};""!=p&&p!=mxConstants.NONE&&(c.highlight=p);"auto"!==e&&(c.target=e);x||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),
-c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);l&&d.push("layers");0<d.length&&(x&&d.push("lightbox"),c.toolbar=d.join(" "));null!=y&&0<y.length&&(c.edit=y);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+
-encodeURIComponent(a):"";t(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
-mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","type-embedhtmldialog");f=m.cloneNode(!0);f.setAttribute("value",
-"copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var l=this.getCurrentFile();null==d&&null!=l&&l.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),
-mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));f.setAttribute("checked","checked");null==d&&m.setAttribute("disabled","disabled");c.appendChild(g);var t=this.addLinkSection(c),z=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=
-"100%";c.appendChild(E);var A=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,C=C=this.addCheckbox(c,mxResources.get("allPages"),g,!g),G=this.addCheckbox(c,mxResources.get("layers"),!0),F=this.addCheckbox(c,mxResources.get("lightbox"),!0),I=this.addEditButton(c,F),K=I.getEditInput();K.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&F.checked?I.getEditSelect().removeAttribute("disabled"):
-I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(m.checked?d:null,z.checked,E.value,t.getTarget(),t.getColor(),A.checked,C.checked,G.checked,F.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,p,n,k){k=document.createElement("div");k.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,a||mxResources.get("link"));c.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(c);var f=this.getCurrentFile(),c="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=f&&f.constructor==window.DriveFile&&!b){a=80;var c="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");m.style.whiteSpace=
-"normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));g.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(f.getId())}));m.style.marginTop="12px";m.className="geBtn";g.appendChild(m);k.appendChild(g);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"));g.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,v=null;if(null!=d||null!=e)a+=30,mxUtils.write(k,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight=
-"16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",k.appendChild(l),mxUtils.write(k,mxResources.get("height")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.width="50px",v.style.marginLeft="6px",v.style.marginBottom="10px",v.value=e+"px",k.appendChild(v),mxUtils.br(k);var t=this.addLinkSection(k,n);d=null!=this.pages&&1<this.pages.length;var C=null;if(null==f||f.constructor!=window.DriveFile||b)C=
-this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!n),F=this.addEditButton(k,G),I=F.getEditInput();n&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var K=this.addCheckbox(k,mxResources.get("layers"),!0);K.style.marginLeft=I.style.marginLeft;K.style.marginBottom="16px";K.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(K.removeAttribute("disabled"),I.removeAttribute("disabled")):(K.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,k,mxUtils.bind(this,function(){p(t.getTarget(),t.getColor(),null==C?!0:C.checked,G.checked,F.getLink(),K.checked,null!=l?l.value:null,null!=v?v.value:null)}),null,mxResources.get("create"),c);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,p){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";c.appendChild(f);if(p){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
-"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";c.appendChild(m);mxUtils.br(c)}var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
-l=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,t=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(m.value)||0;d(!k.checked,null!=l?l.checked:!1,null!=t?t.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(p?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(a,b,d,e,p,n,k,l){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(m);mxUtils.write(c,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
-"12px";q.value=this.lastExportZoom||"100%";c.appendChild(q);mxUtils.write(c,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";c.appendChild(v);mxUtils.br(c);var t=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),G=null;"dark"==uiTheme&&(G=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(c,
-mxResources.get("selectionOnly"),!1,f.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");n&&(c.appendChild(I),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(I.setAttribute("checked","checked"),
-I.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");b&&(c.appendChild(u),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var J=null;if("png"==l||"jpeg"==l)J=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
-!0),g+=26;var B=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),P=null!=this.pages&&1<this.pages.length,S=this.addCheckbox(c,P?mxResources.get("allPages"):"",P,!P,null,"jpeg"!=l);S.style.marginLeft="24px";S.style.marginBottom="16px";P?g+=26:S.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&P?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")});k&&P||S.setAttribute("disabled","disabled");var H=document.createElement("select");
-H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
-l&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(H),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;p(q.value,t.checked,!F.checked,K.checked,B.checked,u.checked,v.value,I.checked,!S.checked,H.value,null!=J?J.checked:null,null!=G?G.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,p){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),k=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,
-!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,t),A=E.getEditInput(),C=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(c,mxResources.get("layers"),C,!C);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(C&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
-A.checked&&t.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,k.checked,l.checked,t.checked,E.getLink(),G.checked)}),null,mxResources.get("embed"),p);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,k,n,l,q){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var m="";d&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+m+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
-mxUtils.bind(this,function(a){q({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+
-m.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,e,k,n,l){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var m=f[g].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));
-b&&this.editor.graph.addSvgShadow(c);if(d){var p=" ",v="";e&&(p="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"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",v+="cursor:pointer;");a&&
-(v+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=v?' style="'+v+'"':"")+p+"/>")}))}else v="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),v+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=v&&c.setAttribute("style",v),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m,k){"text/xml"!=d||/(\.drawio)$/i.test(b)||/(\.xml)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.html)$/i.test(b)||(b=b+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),
+d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(f?parseInt(f[2],10):
+!1)?!1:k}if(k||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));k?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},2E4),c.click(),c.parentNode.removeChild(c)}catch(C){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,m,k){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=k?"&base64="+k:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),p=0;p<f;++p){for(var k=1024*p,n=Math.min(k+1024,d),z=Array(n-k),q=0;k<n;++q,++k)z[q]=c[k].charCodeAt(0);e[p]=new Uint8Array(z)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,m,k,p,n){k=null!=k?k:!1;p=null!=p?p:"vsdx"!=
+m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(k);isLocalStorage&&m++;var c=4>=m?2:6<m?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e,null,n):null!=c&&0<c.length&&
+this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(B){this.handleError(B)}}))}catch(y){this.handleError(y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,p,null,1<m,c,a,d,e);k=this.isServices(m)?m>c?390:270:160;this.showDialog(b.container,400,k,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?"image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+a+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";
+a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,
+"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,k,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&
+c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,k,!0,c,d)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,k,!0,c,d)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<c,f,e,k,m);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,
+380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,m,k){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,m,k,p,n,q,z,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&
+(f=null);null==f&&0==b&&(f=u?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var g=this.editor.graph.getSvg(f,a,p,n,null,d,null,null,"blank"==z?"_blank":"self"==z?"_top":null,null,!0,u);e&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,q,null,null,null,!1));var c='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(H){this.handleError(H)}};EditorUi.prototype.addRadiobox=
+function(a,b,d,e,m,k,p){return this.addCheckbox(a,d,e,m,k,p,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,k,p,n){k=null!=k?k:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();c.id=p;null!=n&&c.setAttribute("name",n);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");k&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,
+b),d.setAttribute("for",p),a.appendChild(d),m||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");
+d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,
+300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){p.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?
+"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",p=
+null,p=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();p.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";p.style.marginLeft="4px";p.style.height="22px";p.style.width="22px";p.style.position="relative";p.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";p.className="geColorBtn";a.appendChild(p);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};
+EditorUi.prototype.createUrlParameters=function(a,b,d,e,m,k,p){p=null!=p?p:[];e&&("1"==urlParams.dev&&p.push("lightbox=1"),"auto"!=a&&p.push("target="+a),null!=b&&b!=mxConstants.NONE&&p.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=m&&0<m.length&&p.push("edit="+encodeURIComponent(m)),k&&p.push("layers=1"),this.editor.graph.foldingEnabled&&p.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};
+EditorUi.prototype.createLink=function(a,b,d,e,m,k,p,n,q){q=null!=q?q:this.createUrlParameters(a,b,d,e,m,k);a=this.getCurrentFile();b=!0;null!=p?d="#U"+encodeURIComponent(p):(a=this.getCurrentFile(),n||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),b=!1));b&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&q.push("title="+
+encodeURIComponent(a.getTitle()));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<q.length?"?"+q.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,k,p,n,q,z,u){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);q||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);
+isNaN(d)||100==d||(c.zoom=d/100);d=[];p&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);n&&d.push("layers");0<d.length&&(q&&d.push("lightbox"),c.toolbar=d.join(" "));null!=z&&0<z.length&&(c.edit=z);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!p);b='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+
+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";u(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");f=l.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var n=this.getCurrentFile();null==d&&null!=n&&n.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.style.cursor="pointer",mxUtils.write(k,mxResources.get("share")),g.appendChild(k),
+mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked","checked");null==d&&l.setAttribute("disabled","disabled");c.appendChild(g);var q=this.addLinkSection(c),u=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");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=
+"100%";c.appendChild(y);var B=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(c,mxResources.get("allPages"),g,!g),F=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"),!0),G=this.addEditButton(c,H),v=G.getEditInput();v.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled");v.checked&&H.checked?G.getEditSelect().removeAttribute("disabled"):
+G.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(l.checked?d:null,u.checked,y.value,q.getTarget(),q.getColor(),B.checked,E.checked,F.checked,H.checked,G.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,m,k,p){p=document.createElement("div");p.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,a||mxResources.get("link"));c.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(c);var f=this.getCurrentFile(),c="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=f&&f.constructor==window.DriveFile&&!b){a=80;var c="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace=
+"normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));g.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(f.getId())}));l.style.marginTop="12px";l.className="geBtn";g.appendChild(l);p.appendChild(g);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"));g.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,t=null;if(null!=d||null!=e)a+=30,mxUtils.write(p,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight=
+"16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",p.appendChild(n),mxUtils.write(p,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",p.appendChild(t),mxUtils.br(p);var q=this.addLinkSection(p,k);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==f||f.constructor!=window.DriveFile||b)u=
+this.addCheckbox(p,mxResources.get("allPages"),d,!d);var F=this.addCheckbox(p,mxResources.get("lightbox"),!0,null,null,!k),H=this.addEditButton(p,F),G=H.getEditInput();k&&(G.style.marginLeft=F.style.marginLeft,F.style.display="none",a-=30);var v=this.addCheckbox(p,mxResources.get("layers"),!0);v.style.marginLeft=G.style.marginLeft;v.style.marginBottom="16px";v.style.marginTop="8px";mxEvent.addListener(F,"change",function(){F.checked?(v.removeAttribute("disabled"),G.removeAttribute("disabled")):(v.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"));G.checked&&F.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,p,mxUtils.bind(this,function(){m(q.getTarget(),q.getColor(),null==u?!0:u.checked,F.checked,H.getLink(),v.checked,null!=n?n.value:null,null!=t?t.value:null)}),null,mxResources.get("create"),c);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";c.appendChild(f);if(m){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";l.style.marginLeft="4px";l.value=this.lastExportBorder||"0";c.appendChild(l);mxUtils.br(c)}var k=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
+n=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(l.value)||0;d(!k.checked,null!=n?n.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(m?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
+function(a,b,d,e,m,k,p,n){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==n?196:300,l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(l);mxUtils.write(c,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
+"12px";t.value=this.lastExportZoom||"100%";c.appendChild(t);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.value=this.lastExportBorder||"0";c.appendChild(x);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=n),u=null;"dark"==uiTheme&&(u=this.addCheckbox(c,mxResources.get("dark"),!0),g+=26);var H=this.addCheckbox(c,
+mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft="24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");k&&(c.appendChild(G),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(G.setAttribute("checked","checked"),
+G.defaultChecked=!0);var v=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||K.setAttribute("disabled","disabled");b&&(c.appendChild(K),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),g+=26);var A=null;if("png"==n||"jpeg"==n)A=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
+!0),g+=26;var T=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=n),O=null!=this.pages&&1<this.pages.length,N=this.addCheckbox(c,O?mxResources.get("allPages"):"",O,!O,null,"jpeg"!=n);N.style.marginLeft="24px";N.style.marginBottom="16px";O?g+=26:N.style.display="none";mxEvent.addListener(T,"change",function(){T.checked&&O?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")});p&&O||N.setAttribute("disabled","disabled");var J=document.createElement("select");
+J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));J.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));J.appendChild(a);"svg"==
+n&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(J),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=x.value;this.lastExportZoom=t.value;m(t.value,q.checked,!H.checked,v.checked,T.checked,K.checked,x.value,G.checked,!N.checked,J.value,null!=A?A.checked:null,null!=u?u.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var l=this.addCheckbox(c,mxResources.get("fit"),!0),k=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,
+!e),n=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),y=this.addEditButton(c,q),u=y.getEditInput(),E=1<f.model.getChildCount(f.model.getRoot()),F=this.addCheckbox(c,mxResources.get("layers"),E,!E);F.style.marginLeft=u.style.marginLeft;F.style.marginBottom="12px";F.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&F.removeAttribute("disabled"),u.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));
+u.checked&&q.checked?y.getEditSelect().removeAttribute("disabled"):y.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(l.checked,k.checked,n.checked,q.checked,y.getLink(),F.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,k,p,n){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var l="";d&&(l=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+c+'"'+l+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
+mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b,null,null,Editor.defaultBorder);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var l=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));l.send(mxUtils.bind(this,function(){200<=l.getStatus()&&299>=l.getStatus()?c("data:image/png;base64,"+
+l.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,b,d,e,m,k,p){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var l=f[g].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));
+b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",t="";e&&(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"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&
+(t+="max-width:100%;");this.editor.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),t+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=t&&c.setAttribute("style",t),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==
-a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d=
-parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,k){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),m=c.getGlobalVariable,p=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
-"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(E){null!=b&&b(E)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,k)}catch(D){null!=b&&b(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,k,n,l,q){q=null!=q?q:!0;l=b.background;l==mxConstants.NONE&&(l=null);n=b.getSvg(l,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&
-n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(a){q?this.editor.convertImages(a,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(m){b(a)}}))}catch(g){b(a)}}))};
-EditorUi.prototype.exportImage=function(a,b,d,e,k,n,l,q,t,y,D,z){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,d,q):null,t,null==this.pages||0==this.pages.length,D)}catch(C){"Invalid image"==C.message?this.downloadFile(t):
-this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,l,y,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,k){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
-var m=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length)m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),e=!1,l=1);for(;l<p.length;l++){var t=
-p[l].getAttribute("id");p[l].removeAttribute("id");var E=this.updatePageRoot(new DiagramPage(p[l]));a[t]=p[l].getAttribute("id");var A=this.pages.length;null==E.getName()&&E.setName(mxResources.get("pageWithNumber",[A+1]));f.model.execute(new ChangePage(this,E,E,A,!0));g.push(E)}this.updatePageLinks(a,g)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(c=f.importGraphModel(m,b,d,e),null!=c))for(l=0;l<c.length;l++)this.updatePageLinksForCell(a,c[l])}finally{f.model.endUpdate()}}}catch(C){if(k)throw C;this.handleError(C)}return c};
-EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var e=c.getElementsByTagName("a"),k=!1,l=0;l<e.length;l++)f=e[l].getAttribute("href"),null!=f&&(e[l].setAttribute("href",this.updatePageLink(a,
-f)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(l=0;l<d.model.getChildCount(b);l++)this.updatePageLinksForCell(a,d.model.getChildAt(b,l))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,
-13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(v){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);
-try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(D){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var k=new XMLHttpRequest;
-k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(E){d(E)}else d({})});k.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(D){d(D)}}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(p){d(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(p){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(p){null!=window.console&&
-console.error(p),d(p)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=
-!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(g))try{var m=b[0].getAttribute("viewBox").split(/\s+/),
-f=parseFloat(m[2]),g=parseFloat(m[3])}catch(z){f=f||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(v){e(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&
-15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),
-0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,m=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(m+1)))),n=mxUtils.parseXml(k).getElementsByTagName("svg");
-0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}d(c.result,a,f)}catch(I){e(I)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=
-function(a,b,d,e,k,n,l){n=null!=n?n:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=
-this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,n,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,n,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):
-f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,b,d,n,!0);if(0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=
-Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),
-c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,n);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,n))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;k=null;c.getModel().beginUpdate();try{k=c.insertVertex(c.getDefaultParent(),
-null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");k.value=a;c.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=c.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&c.setLinkForCell(k,
-k.value);k.geometry.width+=c.gridSize;k.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};
-EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display=
-"none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,
-0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=
-!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,k=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):k||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,k,n,l,q,t,y,D){y=null!=y?y:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,
-a,l)):c=this.importXml(a,d,e,y);null!=q&&q(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,y),t=!0)),t||(b=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),y&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=t&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(c=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=t?(c=!0,this.importZipFile(t,
-g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,y);q(f)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,y));c||null==q||q(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,k,n,l,q,t,y,D,z){e=null!=e?e:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=D||this.resampleThreshold,
-p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>m){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,m=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,d,f,e,g,k,m,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,g,k,m,n,c,z)}catch(V){return this.handleError(V),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var p=a.length,t=p,v=[],x=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--t){this.spinner.stop();if(null!=q)q(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var f=v[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}n(b)}}),A=0;A<p;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,
-9)){var p=a.target.result,u=p.indexOf(","),q=decodeURIComponent(escape(atob(p.substring(u+1)))),t=mxUtils.parseXml(q),q=t.getElementsByTagName("svg");if(0<q.length){var q=q[0],v=z?null:q.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?x(c,mxUtils.bind(this,function(){try{if(p.substring(0,u+1),null!=
-t){var a=t.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=f.getAttribute("width"),q=f.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox","0 0 "+l+" "+q);else if(isNaN(l)||isNaN(q)){var y=v.split(" ");3<y.length&&(l=parseFloat(y[2]),q=parseFloat(y[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(f));var x=Math.min(1,Math.min(e/Math.max(1,
-l)),e/Math.max(1,q)),A=k(p,n.type,b+c*m,d+c*m,Math.max(1,Math.round(l*x)),Math.max(1,Math.round(q*x)),n.name);if(isNaN(l)||isNaN(q)){var B=new Image;B.onload=mxUtils.bind(this,function(){l=Math.max(1,B.width);q=Math.max(1,B.height);A[0].geometry.width=l;A[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+l+" "+q);p=Editor.createSvgDataUri(mxUtils.getXml(f));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[A[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return A}}}catch(Y){}return null})):
-x(c,mxUtils.bind(this,function(){return k(v,"text/xml",b+c*m,d+c*m,0,0,n.name)}))}else x(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==n.type){var A=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;x(c,mxUtils.bind(this,function(){return k(A,"text/xml",b+c*m,d+c*m,B.width,B.height,n.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
-mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,p,l){x(c,mxUtils.bind(this,function(){if(null!=g&&g.length<y){var q=f&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(e/p,e/l)):1;return k(g,n.type,b+c*m,d+c*m,Math.round(p*q),Math.round(l*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,e,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,k(p,n.type,b+c*m,d+c*m,240,160,n.name,function(a){x(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,b+c*m,d+c*m,240,160,n.name,function(a){x(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?p.readAsDataURL(n):p.readAsText(n)}})(A)});if(g){g=[];
-for(p=0;p<a.length;p++)g.push(a[p]);a=g;this.confirmImageResize(function(a){f=a;v()},t)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,k,n){k=null!=k?k:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,n))try{var g=Math.max(c/k,f/k);if(1<g){var m=Math.round(c/g),p=Math.round(f/g),l=document.createElement("canvas");
-l.width=m;l.height=p;l.getContext("2d").drawImage(a,0,0,m,p);var t=l.toDataURL();if(t.length<b.length){var A=document.createElement("canvas");A.width=m;A.height=p;var C=A.toDataURL();t!==C&&(b=t,c=m,f=p)}}}catch(G){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);
-c.src=a}catch(p){if(null!=d)d(p);else throw p;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;"dark"==uiTheme&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+
-":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,e.format,function(f,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=k,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},
-function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,
-g),m.height=Math.max(m.height,k),b.cellsResized([c],[m],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var e=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,d){try{var f=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=f)this.editPlantUmlData(c,d,f);else if(f=this.graph.getAttributeForCell(c,"mermaidData"),
-null!=f)this.editMermaidData(c,d,f);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):e.apply(this,arguments)}}catch(F){a.handleError(F)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(C){a.handleError(C)}return b};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
-"https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var p=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?
-"&":"?")+"dev=1&drawdev=1");return p.apply(this,arguments)};var n=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};n.call(this,a,c,d)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,
-null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var c=l.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,
-a.currentPage)+1:1;return c};var q=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&
-mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/
-2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=this.editor.graph,b=c.cellEditor.text2,d=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&
-(d=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,b,d,f,e,g){c.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=
-a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));c.insertImage(decodeURIComponent(b),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(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)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));
-var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,
-function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=z&&(z.parentNode.removeChild(z),z=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&
-(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),
-c=document.createElement("div");c.innerHTML=b.sanitizeHtml(m);var n=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),null==m&&(m=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,l=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,e,g,!0,
-n,null,p))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",
-mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var k=e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var l=
-this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],l.x,l.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck",
-"false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",
-b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),
-0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&
-this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==
-a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=
-function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
-mxUtils.bind(this,function(a,b){var c=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();
-this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,
-b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=
-function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=
-a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),c=document.createElement("div");c.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&
-"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,g),f=!1));k=k&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName&&(g=k.getAttribute("src"),null!=g&&(mxUtils.setTextContent(c,
-g),f=!1));f&&Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}k=c.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))d=k[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,
-c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);g=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(C){}try{var k=c.getElementsByTagName("span"),l=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):
-decodeURIComponent(f);this.isCompatibleString(l)&&(g=!0,f=l)}catch(C){}try{var t=this.editor.graph;if(null!=f&&0<f.length){t.lastPasteXml==f?t.pasteCounter++:(t.lastPasteXml=f,t.pasteCounter=0);var z=t.pasteCounter*t.gridSize;if(g||this.isCompatibleString(f))t.setSelectionCells(this.importXml(f,z,z));else if(e&&1==t.getSelectionCount()){var E=t.getStartEditingCell(t.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==t.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_IMAGE,
-f,[E]):(t.labelChanged(E,f),Graph.isLink(f)&&t.setLinkForCell(E,f));t.setSelectionCell(E)}else{var A=t.getInsertPoint();t.isMouseInsertPoint()&&(z=0,t.lastPasteXml==f&&0<t.pasteCounter&&t.pasteCounter--);t.setSelectionCells(this.insertTextAt(f,A.x+z,A.y+z,!0))}t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else d||(t.lastPasteXml=null,t.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:
-a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),
-null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?
-EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,b,d,e,k){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":
-b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,
-mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,
-b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if(0==
-a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var f=Editor.extractGraphModelFromPdf(a);null!=f&&(a=f)}this.spinner.stop();this.openLocalFile(a,b,e,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=
-0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(v){this.handleError(v)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d,e,k){var c=this.getCurrentFile(),
-f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d,e,k))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
-0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&
-(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
-a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,
-!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,
-d=!1,e=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
-a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?
-mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):l.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),
-"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=k(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),
-"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(V){l.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();
-var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,
-"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){l.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();
-return}if("textContent"==g.action){var v=this.getDiagramTextContent();l.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||
-g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var K=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=
-g;c.data=a;c.xml=K;l.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(K)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);J(a)}),P=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=P){for(var S=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),
-H,N=0;N<this.pages.length;N++)if(this.pages[N].getId()==P){H=this.updatePageRoot(this.pages[N]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:S.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var ea=u.model,ka=ea.getChildCells(ea.getRoot()),m={},N=0;N<g.layerIds.length;N++)m[g.layerIds[N]]=!0;for(N=0;N<ka.length;N++)ea.setVisible(ka[N],m[ka[N].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(K))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?J("data:image/png;base64,"+
-a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var na=this.getXmlFileData();x.xml=mxUtils.getXml(na);x.data=this.getFileData(null,null,!0,null,null,null,na);x.format=g.format}else if("html"==g.format)K=this.editor.getGraphXml(),x.data=this.getHtml(K,this.editor.graph),x.xml=mxUtils.getXml(K),
-x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var W=this.editor.graph.background;W==mxConstants.NONE&&(W=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var T=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);l.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):
-g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,T,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var Z=this.editor.graph.getSvg(W);this.embedFonts(Z,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){T(mxUtils.getXml(a))})):T(mxUtils.getXml(a))}))}return}l.postMessage(JSON.stringify(x),
-"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==
-uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var la=
-this.getCurrentFile();null!=la&&(n=k(g.xml),null!=n&&""!=n&&la.mergeFile(new LocalFile(this,n),function(){l.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){l.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(l):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),
-"*");return}}catch(V){this.handleError(V)}}var ha=mxUtils.bind(this,function(f,g){b=!0;try{a(f,g)}catch(ga){this.handleError(ga)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var d=k();if(d!=e&&!b){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||
-window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",
-c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;l.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ha(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===
-typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ha(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ha(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),
-ha(g,f))}}));var l=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(k,"*");if("json"==urlParams.proto){var q=this.editor.graph.openLink;this.editor.graph.openLink=function(a,c,b){q.apply(this,arguments);l.postMessage(JSON.stringify({event:"openLink",href:a,target:c,allowOpener:b}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";
-a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var d=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),
-b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b),d=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};
-EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=
-function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],f=[],e={};if(0<c.length){var k={},l=null,t=null,y=null,D=null,z=null,E=null,A=null,C=null,G="",F="auto",I="auto",K=null,u=null,J=40,B=40,P=100,
-S=0,H=this.editor.graph;H.getGraphBounds();for(var N=function(){null!=b?b(qa):(H.setSelectionCells(qa),H.scrollCellToVisible(H.getSelectionCell()))},ea=H.getFreeInsertPoint(),ka=ea.x,na=ea.y,ea=na,W=null,T="auto",C=null,Z=[],la=null,ha=null,V=0;V<c.length&&"#"==c[V].charAt(0);){a=c[V];for(V++;V<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[V].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[V].substring(1)),V++;if("#"!=a.charAt(1)){var fa=a.indexOf(":");if(0<fa){var R=mxUtils.trim(a.substring(1,
-fa)),L=mxUtils.trim(a.substring(fa+1));"label"==R?W=H.sanitizeHtml(L):"labelname"==R&&0<L.length&&"-"!=L?D=L:"labels"==R&&0<L.length&&"-"!=L?z=JSON.parse(L):"style"==R?l=L:"parentstyle"==R?E=L:"stylename"==R&&0<L.length&&"-"!=L?y=L:"styles"==R&&0<L.length&&"-"!=L?t=JSON.parse(L):"identity"==R&&0<L.length&&"-"!=L?A=L:"parent"==R&&0<L.length&&"-"!=L?C=L:"namespace"==R&&0<L.length&&"-"!=L?G=L:"width"==R?F=L:"height"==R?I=L:"left"==R&&0<L.length?K=L:"top"==R&&0<L.length?u=L:"ignore"==R?ha=L.split(","):
-"connect"==R?Z.push(JSON.parse(L)):"link"==R?la=L:"padding"==R?S=parseFloat(L):"edgespacing"==R?J=parseFloat(L):"nodespacing"==R?B=parseFloat(L):"levelspacing"==R?P=parseFloat(L):"layout"==R&&(T=L)}}}if(null==c[V])throw Error(mxResources.get("invalidOrMissingFile"));for(var ga=this.editor.csvToArray(c[V]),R=fa=null,L=[],O=0;O<ga.length;O++)A==ga[O]&&(fa=O),C==ga[O]&&(R=O),L.push(mxUtils.trim(ga[O]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==W&&(W="%"+L[0]+"%");if(null!=
-Z)for(var X=0;X<Z.length;X++)null==k[Z[X].to]&&(k[Z[X].to]={});A=[];for(O=V+1;O<c.length;O++){var ca=this.editor.csvToArray(c[O]);if(null==ca){var ja=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(ja+" ("+O+"):\n"+mxResources.get("containsValidationErrors"));}0<ca.length&&A.push(ca)}H.model.beginUpdate();try{for(O=0;O<A.length;O++){var ca=A[O],M=null,ia=null!=fa?G+ca[fa]:null;null!=ia&&(M=H.model.getCell(ia));var c=null!=M,Y=new mxCell(W,new mxGeometry(ka,ea,0,0),l||"whiteSpace=wrap;html=1;");
-Y.vertex=!0;Y.id=ia;for(var da=0;da<ca.length;da++)H.setAttributeForCell(Y,L[da],ca[da]);if(null!=D&&null!=z){var Q=z[Y.getAttribute(D)];null!=Q&&H.labelChanged(Y,Q)}if(null!=y&&null!=t){var ba=t[Y.getAttribute(y)];null!=ba&&(Y.style=ba)}H.setAttributeForCell(Y,"placeholders","1");Y.style=H.replacePlaceholders(Y,Y.style);c&&(H.model.setGeometry(M,Y.geometry),H.model.setStyle(M,Y.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=Y;if(!c)for(X=0;X<Z.length;X++)k[Z[X].to][M.getAttribute(Z[X].to)]=M;null!=
-la&&"link"!=la&&(H.setLinkForCell(M,M.getAttribute(la)),H.setAttributeForCell(M,la,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var ma=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=K&&null!=M.getAttribute(K)&&(M.geometry.x=ka+parseFloat(M.getAttribute(K))),null!=u&&null!=M.getAttribute(u)&&(M.geometry.y=na+parseFloat(M.getAttribute(u))),"@"==F.charAt(0)&&null!=M.getAttribute(F.substring(1))?M.geometry.width=parseFloat(M.getAttribute(F.substring(1))):M.geometry.width=
-"auto"==F?ma.width+S:parseFloat(F),"@"==I.charAt(0)&&null!=M.getAttribute(I.substring(1))?M.geometry.height=parseFloat(M.getAttribute(I.substring(1))):M.geometry.height="auto"==I?ma.height+S:parseFloat(I),ea+=M.geometry.height+B);c?(null==e[ia]&&(e[ia]=[]),e[ia].push(M)):(C=null!=R?H.model.getCell(G+ca[R]):null,d.push(M),null!=C?(C.style=H.replacePlaceholders(C,E),H.addCell(M,C)):f.push(H.addCell(M)))}for(var pa=f.slice(),qa=f.slice(),X=0;X<Z.length;X++)for(var Aa=Z[X],O=0;O<d.length;O++){var M=d[O],
-Ba=mxUtils.bind(this,function(a,c,b){var d=c.getAttribute(b.from);if(null!=d&&(H.setAttributeForCell(c,b.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=k[b.to][d[f]];if(null!=e){var g=b.label;null!=b.fromlabel&&(g=(c.getAttribute(b.fromlabel)||"")+(g||""));null!=b.tolabel&&(g=(g||"")+(e.getAttribute(b.tolabel)||""));var m="target"==b.placeholders==!b.invert?e:a,m=null!=b.style?H.replacePlaceholders(m,b.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",b.invert?e:
-a,b.invert?a:e,m);if(null!=b.labels)for(m=0;m<b.labels.length;m++){var l=b.labels[m],n=new mxCell(l.label||m,new mxGeometry(null!=l.x?l.x:0,null!=l.y?l.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=l.dx||null!=l.dy)n.geometry.offset=new mxPoint(null!=l.dx?l.dx:0,null!=l.dy?l.dy:0);g.insert(n)}qa.push(g);mxUtils.remove(b.invert?a:e,pa)}}});Ba(M,M,Aa);if(null!=e[M.id])for(da=0;da<e[M.id].length;da++)Ba(M,e[M.id][da],Aa)}if(null!=ha)for(O=0;O<d.length;O++)for(M=
-d[O],da=0;da<ha.length;da++)H.setAttributeForCell(M,mxUtils.trim(ha[da]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(H);ra.spacing=J;var wa=function(){0<ra.spacing&&ra.execute(H.getDefaultParent());for(var a=0;a<f.length;a++){var c=H.getCellGeometry(f[a]);c.x=Math.round(H.snap(c.x));c.y=Math.round(H.snap(c.y));"auto"==F&&(c.width=Math.round(H.snap(c.width)));"auto"==I&&(c.height=Math.round(H.snap(c.height)))}};if("["==T.charAt(0)){var Ca=N;H.view.validate();this.executeLayoutList(JSON.parse(T),
-function(){wa();Ca()});N=null}else if("circle"==T){var sa=new mxCircleLayout(H);sa.resetEdges=!1;var xa=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){sa.execute(H.getDefaultParent());wa()},!0,N);N=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&qa.length==2*f.length-1&&1==pa.length){H.view.validate();var ta=new mxCompactTreeLayout(H,"horizontaltree"==T);ta.levelDistance=B;ta.edgeRouting=!1;ta.resetEdges=
-!1;this.executeLayout(function(){ta.execute(H.getDefaultParent(),0<pa.length?pa[0]:null)},!0,N);N=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==pa.length){H.view.validate();var oa=new mxHierarchicalLayout(H,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=B;oa.parallelEdgeSpacing=J;oa.interRankCellSpacing=P;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(H.getDefaultParent(),qa);H.moveCells(qa,ka,na)},!0,N);N=null}else if("organic"==
-T||"auto"==T&&qa.length>f.length){H.view.validate();var ya=new mxFastOrganicLayout(H);ya.forceConstant=3*B;ya.resetEdges=!1;var Da=ya.isVertexIgnored;ya.isVertexIgnored=function(a){return Da.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(H);ra.spacing=J;this.executeLayout(function(){ya.execute(H.getDefaultParent());wa()},!0,N);N=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=N&&N()}}catch(ua){this.handleError(ua)}};EditorUi.prototype.getSearch=function(a){var c=
-"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=k.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)};var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-c-2*a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var l=c.init;c.init=function(){l.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,this.scale*a.height*c.height)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=
-f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||
-c++;null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;null!=this.gitHub&&c++;null!=this.gitLab&&c++;a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
-var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
-null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
-this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
-var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);
-this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&
-(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||
-"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,l,t){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),m=Math.floor(g.width*k/c.view.scale),n=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(a.hideDialog(),
-"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var p={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<t?"&dpi="+t:"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+n+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,t):a.exportImage(k,!1,!0,!1,
-!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);
-return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
-var k={};try{var l=mxSettings.getCustomLibraries();for(a=0;a<l.length;a++){var t=l[a];if("R"==t.substring(0,1)){var x=JSON.parse(decodeURIComponent(t.substring(1)));k[x[0]]={id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&
-(b[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
-for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):
-c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(f);c&&k.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,f=
-this.remoteInvokableFns[d];if(null!=f&&"function"===typeof this[d]){if(f.allowedDomains){for(var e=!1,k=0;k<f.allowedDomains.length;k++)if(b=="https://"+f.allowedDomains[k]){e=!0;break}if(!e){c(null,"Invalid Call: "+d+" is not allowed.");return}}var l=a.functionArgs;Array.isArray(l)||(l=[]);if(f.isAsync)l.push(function(){c(Array.prototype.slice.apply(arguments))}),l.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,l);else{var t=this[d].apply(this,l);c([t])}}else c(null,"Invalid Call: "+
-d+" is not found.")}catch(y){c(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(v){null!=b&&b(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,f,e=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){e++;l()}),l=mxUtils.bind(this,function(){try{if(e>=f.length)g();else{var a=f[e];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var e={};try{e=JSON.parse(a.data)}catch(K){}"init"==e.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=e.event||d||(c?null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?(f=e.resp[0],c=!1,l()):g():null!=e.resp&&0<e.resp.length&&null!=e.resp[0]?m(e.resp[0]):k())}}catch(K){console.log(K)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(p){null!=b&&b(p)}else null!=b&&b()}else a(this.database)};
-EditorUi.prototype.setDatabaseItem=function(a,b,d,e,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=c.transaction(k,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<k.length;c++)f.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,
-"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var f=c.transaction([d],
-"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),e=[];f.onsuccess=function(b){null==b.target.result?a(e):(e.push(b.target.result.value),b.target.result["continue"]())};f.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var f=c.transaction([d],"readonly").objectStore(d).getAllKeys();f.onsuccess=function(){a(f.result)};f.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=
-function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();
-null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();
-return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,k,l,t,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,k,l,t,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,l,t,q,x,y,D,z,E,A,C,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,e,k,l,t,q,x,y,D,z,E,A,C,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=
-function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,b,d,e,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,d,k,l){function t(){for(var a=z.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==z&&b++;E.style.display=0==b?"block":"none"}function c(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}x={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),t()):e();x=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);x=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function f(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),f=a.timeSince(d);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[f],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function m(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function p(a){a.style.border="";a.removeChild(a.busyImg)}function n(b,d,e,k,l){function u(a,c,d){var f=document.createElement("li");f.className="geCommentAction";var e=document.createElement("a");e.className=
-"geCommentActionLnk";mxUtils.write(e,a);f.appendChild(e);mxEvent.addListener(e,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(f);d&&(f.style.display="none")}function B(){function a(b){c.push(d);if(null!=b.replies)for(var f=0;f<b.replies.length;f++)d=d.nextSibling,a(b.replies[f])}var c=[],d=C;a(b);return{pdiv:d,replies:c}}function A(d,f,e,l,t){function q(){g(A);b.addReply(v,function(a){v.id=a;b.replies.push(v);p(A);e&&e()},function(b){u();m(A);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,t)}function u(){c(v,A,function(a){q()},!0)}var x=B().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var A=n(v,b.replies,x,k+1);f?u():q()}if(l||!b.isResolved){E.style.display="none";var C=document.createElement("div");C.className="geCommentContainer";C.setAttribute("data-commentId",b.id);C.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(C.style.backgroundColor="ghostWhite");
-var y=document.createElement("div");y.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;y.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";y.appendChild(F);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,b.user.displayName||"");F.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",b.id);f(b,
-P);F.appendChild(P);C.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");C.appendChild(y);b.isLocked&&(C.style.opacity="0.5");y=document.createElement("div");y.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";y.appendChild(D);v||b.isLocked||0!=k&&!q||u(mxResources.get("reply"),function(){A("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||v||b.isLocked||(u(mxResources.get("edit"),
-function(){function d(){c(b,C,function(){g(C);b.editComment(b.content,function(){p(C)},function(b){m(C);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),u(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(C);b.deleteComment(function(a){if(!0===a){a=C.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=C.querySelectorAll(".geCommentAction");for(a=
-0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);p(C);C.style.opacity="0.5"}else{c=B(b).replies;for(a=0;a<c.length;a++)z.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){m(C);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));v||b.isLocked||0!=k||u(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
-a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",f=B(b).replies,e="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<f.length;g++){f[g].style.backgroundColor=e;for(var k=f[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);G||(f[g].style.display="none")}t()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,
-!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});C.appendChild(y);null!=e?z.insertBefore(C,e.nextSibling):z.appendChild(C);for(e=0;null!=b.replies&&e<b.replies.length;e++)y=b.replies[e],y.isResolved=b.isResolved,n(y,b.replies,null,k+1,l);null!=x&&(x.comment.id==b.id?(l=b.content,b.content=x.comment.content,c(b,C,x.saveCallback,x.deleteOnCancel),b.content=l):null==x.comment.id&&x.comment.pCommentId==b.id&&(z.appendChild(x.div),c(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return C}}var v=
-!a.canComment(),q=a.canReplyToReplies(),x=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";y.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(E,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var C=D.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
-C.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(C,"click",function(b){function d(){c(f,e,function(b){g(e);a.addComment(b,function(a){b.id=a;F.push(b);p(e)},function(b){m(e);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=a.newComment("",a.getCurrentUser()),e=n(f,F,null,0);d();b.preventDefault();mxEvent.consume(b)});A.appendChild(C)}C=D.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
-C.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(C);a.commentsRefreshNeeded()&&(C=D.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(C.style.filter="invert(100%)"),
-mxEvent.addListener(C,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(C));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){l();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));y.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
-!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
-a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(E);E.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),n(F[a],F,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(z.appendChild(x.div),c(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
-(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(f(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
-A;this.window=new mxWindow(mxResources.get("comments"),y,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
-(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var K=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",K);this.destroy=function(){mxEvent.removeListener(window,"resize",K);this.window.destroy()}},ConfirmDialog=
-function(a,b,e,d,k,l,t,c,f,g,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(n.style.height="60px");mxUtils.write(n,b);p.appendChild(n);null!=g&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",g),n.appendChild(b),p.appendChild(n));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");l=mxUtils.button(l||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});l.className="geBtn";null!=c&&(l.innerHTML=c+"<br>"+l.innerHTML,l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.style.width="40%");a.editor.cancelFirst&&g.appendChild(l);var q=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
-e(v.checked)});g.appendChild(q);null!=t?(q.innerHTML=t+"<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";a.editor.cancelFirst||g.appendChild(l);p.appendChild(g);f?(g.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),n.appendChild(k),p.appendChild(n),
-mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){q.focus()};this.container=p};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=d}return a};EditorUi.prototype.getPngFileProperties=function(a){var c=1,b=0;if(null!=a){if(a.hasAttribute("scale")){var d=
+parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}a.hasAttribute("border")&&(d=parseInt(a.getAttribute("border")),!isNaN(d)&&0<d&&(b=d))}return{scale:c,border:b}};EditorUi.prototype.getEmbeddedPng=function(a,b,d,e,m){try{var c=this.editor.graph,f=null!=c.themes&&"darkTheme"==c.defaultThemeName,g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+!0),c),g=d;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),l=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:l.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,
+"tEXt","mxfile",encodeURIComponent(g));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(y){null!=b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,e,null,c.shadowVisible,null,c,m)}catch(D){null!=b&&b(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,m,k,p,n){n=null!=n?n:!0;p=b.background;p==mxConstants.NONE&&(p=null);k=b.getSvg(p,null,null,null,null,k);b.shadowVisible&&b.addSvgShadow(k);null!=a&&
+k.setAttribute("content",a);null!=d&&k.setAttribute("resource",d);if(null!=m)this.embedFonts(k,mxUtils.bind(this,function(a){n?this.editor.convertImages(a,mxUtils.bind(this,function(a){m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):m((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(k)};EditorUi.prototype.embedFonts=function(a,b){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(l){b(a)}}))}catch(g){b(a)}}))};
+EditorUi.prototype.exportImage=function(a,b,d,e,m,k,p,n,q,z,u,I){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,m?this.getFileData(!0,null,null,null,d,n):null,q,null==this.pages||0==this.pages.length,u)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,k,p,z,I)}catch(B){this.spinner.stop(),this.handleError(B)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,b,d,e,m){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+var l=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=Editor.parseDiagramNode(k[0]),null!=this.currentPage&&(a[k[0].getAttribute("id")]=this.currentPage.getId());else if(1<k.length){var g=[],n=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[k[0].getAttribute("id")]=this.pages[0].getId(),l=Editor.parseDiagramNode(k[0]),e=!1,n=1);for(;n<k.length;n++){var q=
+k[n].getAttribute("id");k[n].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(k[n]));a[q]=k[n].getAttribute("id");var B=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[B+1]));f.model.execute(new ChangePage(this,u,u,B,!0));g.push(u)}this.updatePageLinks(a,g)}}if(null!=l&&"mxGraphModel"===l.nodeName&&(c=f.importGraphModel(l,b,d,e),null!=c))for(n=0;n<c.length;n++)this.updatePageLinksForCell(a,c[n])}finally{f.model.endUpdate()}}}catch(E){if(m)throw E;this.handleError(E)}return c};
+EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,f=d.getLinkForCell(b);null!=f&&d.setLinkForCell(b,this.updatePageLink(a,f));if(d.isHtmlLabel(b)){c.innerHTML=d.sanitizeHtml(d.getLabel(b));for(var e=c.getElementsByTagName("a"),k=!1,n=0;n<e.length;n++)f=e[n].getAttribute("href"),null!=f&&(e[n].setAttribute("href",this.updatePageLink(a,
+f)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(n=0;n<d.model.getChildCount(b);n++)this.updatePageLinksForCell(a,d.model.getChildAt(b,n))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));if(null!=d.actions){for(var f=0;f<d.actions.length;f++){var e=d.actions[f];null!=e.open&&"data:page/id,"==e.open.substring(0,
+13)&&(c=a[e.open.substring(e.open.indexOf(",")+1)],null!=c?e.open="data:page/id,"+c:delete e.open)}b="data:action/json,"+JSON.stringify(d)}}catch(p){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);
+try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");if(0<=g&&g<e.length)f=e.substring(g+1).toUpperCase();else{var l=e.lastIndexOf("/");0<=l&&l<e.length&&(e=e.substring(l+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(D){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{c=new FormData;c.append("file1",a,e);var m=new XMLHttpRequest;
+m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(B){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(y){d(y)}else try{""==m.responseType||"text"==m.responseType?d({message:m.responseText}):
+(c=new FileReader,c.onload=function(){d({message:JSON.parse(c.result).Message})},c.readAsText(m.response))}catch(y){d({})}});m.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(D){d(D)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});
+var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,b,d)}catch(m){d(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||
+this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(m){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(m){null!=window.console&&console.error(m),d(m)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=
+function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel="strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");
+if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));if(isNaN(f)||isNaN(g))try{var l=b[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(l[2]),g=parseFloat(l[3])}catch(I){f=f||100,g=g||100}d(c.convertDataUri(Editor.createSvgDataUri(a)),f,g)}else e({message:mxResources.get("invalidInput")})}catch(I){e(I)}})}catch(p){e(p)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType="blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=
+b.width,f=b.height;if(0==a&&0==f){var g=c.result,l=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(m).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),f=parseFloat(k[0].getAttribute("height")))}d(c.result,a,f)}catch(G){e(G)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,f=null;c.getModel().beginUpdate();try{f=
+c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(f,!0)}finally{c.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(a,b,d,e,m,k,p){k=null!=k?k:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&
+299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,
+b,d,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f,b,d,k,!0);if(0<g.length)return g}catch(I){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",
+c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,
+function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,d,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;m=null;c.getModel().beginUpdate();try{m=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");
+m.value=a;c.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var l=c.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=l.width;m.geometry.height=l.height}Graph.isLink(m.value)&&c.setLinkForCell(m,m.value);m.geometry.width+=c.gridSize;m.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};
+EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==
+this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,
+function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var f=this.dialog,e=f.close;this.dialog.close=
+mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(f,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(f){if(0==Object.keys(f.files).length)d();else{var e=0,g,l=!1;f.forEach(function(a,c){var f=c.name.toLowerCase();"diagram/diagram.xml"==f?(l=!0,c.async("string").then(function(a){0==
+a.indexOf("<mxfile ")?b(a):d()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>e&&(e=f,g=c))});0<e?g.async("string").then(function(f){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(f,a.name)?c.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):l||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():
+(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(a,b,d,e,m,k,p,n,q,u,D){u=null!=u?u:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,p)):c=this.importXml(a,d,e,u);null!=n&&n(c)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=D?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,u),q=!0)),q||(b=this.editor.graph,
+D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),u&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,m,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=q&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?(c=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=n&&n(null))}),p)):0==a.indexOf("PK")&&null!=q?(c=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,u);n(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,
+u));c||null==n||n(f);return f};EditorUi.prototype.importFiles=function(a,b,d,e,m,k,p,n,q,u,D,I){e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var l=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>l){g=!0;break}var x=mxUtils.bind(this,function(){var g=this.editor.graph,l=g.gridSize;m=null!=m?m:mxUtils.bind(this,function(a,b,d,f,e,g,l,m,
+k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,f,e,g,l,m,k,c,I)}catch(U){return this.handleError(U),null}});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,x=[],y=mxUtils.bind(this,function(a,c){x[a]=c;if(0==--q){this.spinner.stop();if(null!=n)n(x);else{var b=[];g.getModel().beginUpdate();try{for(var d=
+0;d<x.length;d++){var f=x[d]();null!=f&&(b=b.concat(f))}}finally{g.getModel().endUpdate()}}k(b)}}),z=0;z<t;z++)mxUtils.bind(this,function(c){var k=a[c];if(null!=k){var n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==p||p(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(t+1)))),x=mxUtils.parseXml(q),q=x.getElementsByTagName("svg");if(0<q.length){var q=q[0],v=I?null:q.getAttribute("content");
+null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?y(c,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var f=a[0],p=f.getAttribute("width"),q=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,q=null!=q&&"%"!=q.charAt(q.length-
+1)?parseFloat(q):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+q);else if(isNaN(p)||isNaN(q)){var v=u.split(" ");3<v.length&&(p=parseFloat(v[2]),q=parseFloat(v[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,p)),e/Math.max(1,q)),z=m(n,k.type,b+c*l,d+c*l,Math.max(1,Math.round(p*y)),Math.max(1,Math.round(q*y)),k.name);if(isNaN(p)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){p=Math.max(1,A.width);
+q=Math.max(1,A.height);z[0].geometry.width=p;z[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+p+" "+q);n=Editor.createSvgDataUri(mxUtils.getXml(f));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));g.setCellStyles("image",n,[z[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return z}}}catch(aa){}return null})):y(c,mxUtils.bind(this,function(){return m(v,"text/xml",b+c*l,d+c*l,0,0,k.name)}))}else y(c,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==
+k.type){var z=I?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var A=new Image;A.src=a.target.result;y(c,mxUtils.bind(this,function(){return m(z,"text/xml",b+c*l,d+c*l,A.width,A.height,k.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,p,n){y(c,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var t=f&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(e/p,e/n)):1;return m(g,k.type,b+c*l,d+c*l,Math.round(p*t),Math.round(n*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=
+a.target.result,m(n,k.type,b+c*l,d+c*l,240,160,k.name,function(a){y(c,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?m(null,k.type,b+c*l,d+c*l,240,160,k.name,function(a){y(c,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?n.readAsDataURL(k):n.readAsText(k)}})(z)});if(g){g=[];for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){f=a;x()},q)}else x()};EditorUi.prototype.confirmImageResize=
+function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(t){}};EditorUi.prototype.isResampleImage=
+function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,m,k){m=null!=m?m:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(c/m,f/m);if(1<g){var l=Math.round(c/g),n=Math.round(f/g),t=document.createElement("canvas");t.width=l;t.height=n;t.getContext("2d").drawImage(a,0,0,l,n);var q=t.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=l;u.height=
+n;var E=u.toDataURL();q!==E&&(b=q,c=l,f=n)}}}catch(F){}d(b,c,f)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(m){if(null!=d)d(m);else throw m;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;"dark"==uiTheme&&(b.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);b.cellEditor.editPlantUmlData=function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("plantUml")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,e.format,function(f,g,l){a.spinner.stop();
+b.getModel().beginUpdate();try{if("txt"==e.format)b.labelChanged(c,"<pre>"+f+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(f),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=l,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:e.format}))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=
+function(c,d,f){var e=JSON.parse(f);d=new TextareaDialog(a,mxResources.get("mermaid")+":",e.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,e.config,function(f,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",f,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,g),m.height=Math.max(m.height,l),b.cellsResized([c],[m],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,
+config:e.config},null,2))}finally{b.getModel().endUpdate()}},function(c){a.handleError(c)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(c,f){try{var e=this.graph.getAttributeForCell(c,"plantUmlData");if(null!=e)this.editPlantUmlData(c,f,e);else if(e=this.graph.getAttributeForCell(c,"mermaidData"),null!=e)this.editMermaidData(c,f,e);else{var g=b.getCellStyle(c);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(c):
+d.apply(this,arguments)}}catch(H){a.handleError(H)}};b.getLinkTitle=function(c){return a.getLinkTitle(c)};b.customLinkClicked=function(c){var b=!1;try{a.handleCustomLink(c),b=!0}catch(E){a.handleError(E)}return b};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||
+/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var m=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(c){c=null!=c?c:"";if(null!=a.pages&&null!=a.currentPage)for(var b=0;b<a.pages.length;b++)if(a.pages[b]==a.currentPage){0<b&&(c+=(0<c.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(c+=(0<c.length?"&":"?")+"dev=1&drawdev=1");return m.apply(this,arguments)};var n=b.addClickHandler;b.addClickHandler=function(a,c,d){var f=
+c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=f&&f(a,c)};n.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?
+450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var p=b.getExportVariables;b.getExportVariables=function(){var c=p.apply(this,arguments),b=a.getCurrentFile();null!=b&&(c.filename=b.getTitle());c.pagecount=null!=a.pages?a.pages.length:1;c.page=null!=a.currentPage?a.currentPage.getName():"";c.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return c};var q=b.getGlobalVariable;b.getGlobalVariable=function(c){var b=a.getCurrentFile();return"filename"==
+c&&null!=b?b.getTitle():"page"==c&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==c?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==c?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var f=c.getAttribute("href");if(null==f||!b.isCustomLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(f),
+b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var c=a.defaultFilename,b=a.getCurrentFile();null!=b&&(c=null!=b.getTitle()?b.getTitle():c);return c};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&b.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
+function(a){var c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,
+Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&
+(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(a,c){mxSettings.setUnit(c.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){z=document.getElementById("geFooter");null!=z&&(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)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var I=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=I&&(I.parentNode.removeChild(I),I=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=I&&(I.parentNode.removeChild(I),I=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,f=b.view.scale,e=c.x/f-d.x,g=c.y/f-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=e=null),this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=e=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=b.sanitizeHtml(m);var k=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),null==m&&(m=d[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||
+(k=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,e,g,!0,k,null,p))});k&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
+function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),
+e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var b=c.clipboardData||c.originalEvent.clipboardData,d=!1,f=0;f<b.types.length;f++)if("text/"===b.types[f].substring(0,5)){d=!0;break}if(!d){var e=b.items;for(index in e){var k=
+e[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(c,b,d,f,e,g){a.insertImage(c,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){d.innerHTML=
+"&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position="absolute";d.style.whiteSpace="nowrap";d.style.overflow=
+"hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(p){this.handleError(p)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(d,!0),a()}catch(p){this.handleError(p)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:m.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var c=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");0<b&&(c=this.getPageById(a.substring(b+1)),c=null!=c?c.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(c=mxResources.get("action"));return c};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");if(a=this.getPageById(a.substring(c+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=
+null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var l="<meta "==g.substring(0,6),c=document.createElement("div");c.innerHTML=(l?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<
+g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&
+(mxUtils.setTextContent(c,g),f=!1));l=l&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=l&&null==l.nextSibling&&l.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==l.nodeName&&(g=l.getAttribute("src"),null!=g&&(mxUtils.setTextContent(c,g),f=!1));f&&Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}l=c.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===
+l[0].getAttribute("data-lucid-type"))d=l[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var c=this.editor.graph;c.lastPasteXml==a?c.pasteCounter++:(c.lastPasteXml=a,c.pasteCounter=0);var b=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(a,b,b));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):
+c.innerText);g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(E){}try{var l=c.getElementsByTagName("span"),n=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f);this.isCompatibleString(n)&&(g=!0,f=n)}catch(E){}try{var q=this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var u=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,
+u,u));else if(e&&1==q.getSelectionCount()){var y=q.getStartEditingCell(q.getSelectionCell(),a);/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==q.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_IMAGE,f,[y]):(q.labelChanged(y,f),Graph.isLink(f)&&q.setLinkForCell(y,f));q.setSelectionCell(y)}else{var B=q.getInsertPoint();q.isMouseInsertPoint()&&(u=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,B.x+u,B.y+u,!0))}q.isSelectionEmpty()||
+(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(E){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(E){this.handleError(E)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),
+mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?
+this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?b=d.getData("Text"):(b=null,b=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?
+d.getData("text/html"):null,null!=b&&0<b.length?(d=document.createElement("div"),d.innerHTML=this.editor.graph.sanitizeHtml(b),d=d.getElementsByTagName("img"),0<d.length&&(b=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(b=d.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+
+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=
+function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=c+"px";k.style.left=b+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=
+Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFileHandle=function(a,
+b,d,e,m){if(null!=b&&0<b.length){!this.useCanvasForExport&&/(\.png)$/i.test(b)?b=b.substring(0,b.length-4)+".drawio":/(\.pdf)$/i.test(b)&&(b=b.substring(0,b.length-4)+".drawio");var c=mxUtils.bind(this,function(a){b=0<=b.lastIndexOf(".")?b.substring(0,b.lastIndexOf("."))+".drawio":b+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,b))}catch(C){this.handleError(C,
+mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,b,e)});if(/(\.v(dx|sdx?))($|\?)/i.test(b)||/(\.vs(x|sx?))($|\?)/i.test(b))this.importVisio(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(/(\.*<graphml )/.test(a))this.importGraphML(a,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?c(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(b)&&(b=b.substring(0,b.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,b,e)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,e);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();c(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,b,e)}));else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==
+d.type){var f=Editor.extractGraphModelFromPdf(a);null!=f&&(a=f)}this.spinner.stop();this.openLocalFile(a,b,e,m,null!=m?d:null)}}};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.openFileHandle(c.target.result,a.name,a,b)}catch(p){this.handleError(p)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
+window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d,e,m){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+a,b||this.defaultFilename,d,e,m))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?
+this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=
+function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
+function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
+a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
+this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
+pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
+(a=Graph.decompress(a)))}catch(ea){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);return}if("prompt"==g.action){this.spinner.stop();
+var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(U){n.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+name:c,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var v=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var C=this.editor.graph,A=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=v;n.postMessage(JSON.stringify(b),"*")}),T=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(v)));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container);
+A(a)}),O=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=O){for(var N=C.getGlobalVariable,C=this.createTemporaryGraph(C.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==O){J=this.updatePageRoot(this.pages[S]);break}C.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:N.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(J.root)}if(null!=g.layerIds){for(var ga=
+C.model,ja=ga.getChildCells(ga.getRoot()),k={},S=0;S<g.layerIds.length;S++)k[g.layerIds[S]]=!0;for(S=0;S<ja.length;S++)ga.setVisible(ja[S],k[ja[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){T(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){T(null)}),null,null,g.scale,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?A("data:image/png;base64,"+a.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();x.xml=mxUtils.getXml(da);
+x.data=this.getFileData(null,null,!0,null,null,null,da);x.format=g.format}else if("html"==g.format)v=this.editor.getGraphXml(),x.data=this.getHtml(v,this.editor.graph),x.xml=mxUtils.getXml(v),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ba=this.editor.graph.background;ba==mxConstants.NONE&&(ba=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var W=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=
+Editor.createSvgDataUri(a);n.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,W,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var fa=this.editor.graph.getSvg(ba);this.embedFonts(fa,mxUtils.bind(this,
+function(a){g.embedImages||null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){W(mxUtils.getXml(a))})):W(mxUtils.getXml(a))}))}return}n.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),
+null!=g.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){n.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){n.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==g.action?
+this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ka=mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(ca){this.handleError(ca)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});
+e=l();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
+b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var k=this.createLoadMessage("load");k.xml=f;n.postMessage(JSON.stringify(k),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ka(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ka(a.responseText,f)}),""):null!=g&&"function"===
+typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ka(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ka(g,f))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";n.postMessage(k,"*");if("json"==urlParams.proto){var q=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){q.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:a,
+target:b,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var d=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),
+b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),d=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
+a.appendChild(b),d=b);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),f=0;f<a.length;f++){var e=new window[a[f].layout](c);if(null!=a[f].config)for(var k in a[f].config)e[k]=a[f].config[k];this.executeLayout(function(){e.execute(c.getDefaultParent(),0==d.length?null:d)},f==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),
+d=[],f=[],e={};if(0<c.length){var k={},n=null,q=null,u=null,D=null,I=null,y=null,B=null,E=null,F="",H="auto",G="auto",v=null,K=null,A=40,T=40,O=100,N=0,J=this.editor.graph;J.getGraphBounds();for(var S=function(){null!=b?b(na):(J.setSelectionCells(na),J.scrollCellToVisible(J.getSelectionCell()))},ga=J.getFreeInsertPoint(),ja=ga.x,da=ga.y,ga=da,ba=null,W="auto",E=null,fa=[],ha=null,ka=null,U=0;U<c.length&&"#"==c[U].charAt(0);){a=c[U];for(U++;U<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[U].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(c[U].substring(1)),U++;if("#"!=a.charAt(1)){var ea=a.indexOf(":");if(0<ea){var Q=mxUtils.trim(a.substring(1,ea)),L=mxUtils.trim(a.substring(ea+1));"label"==Q?ba=J.sanitizeHtml(L):"labelname"==Q&&0<L.length&&"-"!=L?D=L:"labels"==Q&&0<L.length&&"-"!=L?I=JSON.parse(L):"style"==Q?n=L:"parentstyle"==Q?y=L:"stylename"==Q&&0<L.length&&"-"!=L?u=L:"styles"==Q&&0<L.length&&"-"!=L?q=JSON.parse(L):"identity"==Q&&0<L.length&&"-"!=L?B=L:"parent"==Q&&0<L.length&&"-"!=L?E=L:
+"namespace"==Q&&0<L.length&&"-"!=L?F=L:"width"==Q?H=L:"height"==Q?G=L:"left"==Q&&0<L.length?v=L:"top"==Q&&0<L.length?K=L:"ignore"==Q?ka=L.split(","):"connect"==Q?fa.push(JSON.parse(L)):"link"==Q?ha=L:"padding"==Q?N=parseFloat(L):"edgespacing"==Q?A=parseFloat(L):"nodespacing"==Q?T=parseFloat(L):"levelspacing"==Q?O=parseFloat(L):"layout"==Q&&(W=L)}}}if(null==c[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var ca=this.editor.csvToArray(c[U]),Q=ea=null,L=[],R=0;R<ca.length;R++)B==ca[R]&&
+(ea=R),E==ca[R]&&(Q=R),L.push(mxUtils.trim(ca[R]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ba&&(ba="%"+L[0]+"%");if(null!=fa)for(var Y=0;Y<fa.length;Y++)null==k[fa[Y].to]&&(k[fa[Y].to]={});B=[];for(R=U+1;R<c.length;R++){var Z=this.editor.csvToArray(c[R]);if(null==Z){var Ca=40<c[R].length?c[R].substring(0,40)+"...":c[R];throw Error(Ca+" ("+R+"):\n"+mxResources.get("containsValidationErrors"));}0<Z.length&&B.push(Z)}J.model.beginUpdate();try{for(R=0;R<B.length;R++){var Z=
+B[R],M=null,ma=null!=ea?F+Z[ea]:null;null!=ma&&(M=J.model.getCell(ma));var c=null!=M,aa=new mxCell(ba,new mxGeometry(ja,ga,0,0),n||"whiteSpace=wrap;html=1;");aa.vertex=!0;aa.id=ma;for(var P=0;P<Z.length;P++)J.setAttributeForCell(aa,L[P],Z[P]);if(null!=D&&null!=I){var ia=I[aa.getAttribute(D)];null!=ia&&J.labelChanged(aa,ia)}if(null!=u&&null!=q){var la=q[aa.getAttribute(u)];null!=la&&(aa.style=la)}J.setAttributeForCell(aa,"placeholders","1");aa.style=J.replacePlaceholders(aa,aa.style);c&&(J.model.setGeometry(M,
+aa.geometry),J.model.setStyle(M,aa.style),0>mxUtils.indexOf(f,M)&&f.push(M));M=aa;if(!c)for(Y=0;Y<fa.length;Y++)k[fa[Y].to][M.getAttribute(fa[Y].to)]=M;null!=ha&&"link"!=ha&&(J.setLinkForCell(M,M.getAttribute(ha)),J.setAttributeForCell(M,ha,null));J.fireEvent(new mxEventObject("cellsInserted","cells",[M]));var sa=this.editor.graph.getPreferredSizeForCell(M);M.vertex&&(null!=v&&null!=M.getAttribute(v)&&(M.geometry.x=ja+parseFloat(M.getAttribute(v))),null!=K&&null!=M.getAttribute(K)&&(M.geometry.y=
+da+parseFloat(M.getAttribute(K))),"@"==H.charAt(0)&&null!=M.getAttribute(H.substring(1))?M.geometry.width=parseFloat(M.getAttribute(H.substring(1))):M.geometry.width="auto"==H?sa.width+N:parseFloat(H),"@"==G.charAt(0)&&null!=M.getAttribute(G.substring(1))?M.geometry.height=parseFloat(M.getAttribute(G.substring(1))):M.geometry.height="auto"==G?sa.height+N:parseFloat(G),ga+=M.geometry.height+T);c?(null==e[ma]&&(e[ma]=[]),e[ma].push(M)):(E=null!=Q?J.model.getCell(F+Z[Q]):null,d.push(M),null!=E?(E.style=
+J.replacePlaceholders(E,y),J.addCell(M,E)):f.push(J.addCell(M)))}for(var qa=f.slice(),na=f.slice(),Y=0;Y<fa.length;Y++)for(var Da=fa[Y],R=0;R<d.length;R++){var M=d[R],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(J.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),f=0;f<d.length;f++){var e=k[c.to][d[f]];if(null!=e){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(e.getAttribute(c.tolabel)||""));
+var l="target"==c.placeholders==!c.invert?e:a,l=null!=c.style?J.replacePlaceholders(l,c.style):J.createCurrentEdgeStyle(),g=J.insertEdge(null,null,g||"",c.invert?e:a,c.invert?a:e,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}na.push(g);
+mxUtils.remove(c.invert?a:e,qa)}}});wa(M,M,Da);if(null!=e[M.id])for(P=0;P<e[M.id].length;P++)wa(M,e[M.id][P],Da)}if(null!=ka)for(R=0;R<d.length;R++)for(M=d[R],P=0;P<ka.length;P++)J.setAttributeForCell(M,mxUtils.trim(ka[P]),null);if(0<f.length){var ra=new mxParallelEdgeLayout(J);ra.spacing=A;var xa=function(){0<ra.spacing&&ra.execute(J.getDefaultParent());for(var a=0;a<f.length;a++){var b=J.getCellGeometry(f[a]);b.x=Math.round(J.snap(b.x));b.y=Math.round(J.snap(b.y));"auto"==H&&(b.width=Math.round(J.snap(b.width)));
+"auto"==G&&(b.height=Math.round(J.snap(b.height)))}};if("["==W.charAt(0)){var ya=S;J.view.validate();this.executeLayoutList(JSON.parse(W),function(){xa();ya()});S=null}else if("circle"==W){var pa=new mxCircleLayout(J);pa.resetEdges=!1;var za=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return za.apply(this,arguments)||0>mxUtils.indexOf(f,a)};this.executeLayout(function(){pa.execute(J.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==W||"verticaltree"==W||"auto"==W&&na.length==
+2*f.length-1&&1==qa.length){J.view.validate();var oa=new mxCompactTreeLayout(J,"horizontaltree"==W);oa.levelDistance=T;oa.edgeRouting=!1;oa.resetEdges=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==W||"verticalflow"==W||"auto"==W&&1==qa.length){J.view.validate();var Aa=new mxHierarchicalLayout(J,"horizontalflow"==W?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Aa.intraCellSpacing=T;Aa.parallelEdgeSpacing=A;
+Aa.interRankCellSpacing=O;Aa.disableEdgeStyle=!1;this.executeLayout(function(){Aa.execute(J.getDefaultParent(),na);J.moveCells(na,ja,da)},!0,S);S=null}else if("organic"==W||"auto"==W&&na.length>f.length){J.view.validate();var ta=new mxFastOrganicLayout(J);ta.forceConstant=3*T;ta.resetEdges=!1;var ua=ta.isVertexIgnored;ta.isVertexIgnored=function(a){return ua.apply(this,arguments)||0>mxUtils.indexOf(f,a)};ra=new mxParallelEdgeLayout(J);ra.spacing=A;this.executeLayout(function(){ta.execute(J.getDefaultParent());
+xa()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
+n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
+2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),
+b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&
+(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);
+this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=
+function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);
+this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=
+d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,k,n,p){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,k,n)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),l=Math.floor(g.width*k/c.view.scale),
+m=Math.floor(g.height*k/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==
+d?a.exportImage(k,null==e||"none"==e,!0,!1,!1,n,!0,!1,null,null,p):a.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));
+b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
+e.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();for(a=0;a<n.length;a++){var q=n[a];if("R"==q.substring(0,1)){var u=JSON.parse(decodeURIComponent(q.substring(1)));k[u[0]]={id:u[0],title:u[1],downloadUrl:u[2]}}}}catch(z){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));
+c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+
+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,k){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);c&&e.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(f);c&&k.apply(this,
+arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),
+"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var n=a.functionArgs;Array.isArray(n)||(n=[]);if(e.isAsync)n.push(function(){c(Array.prototype.slice.apply(arguments))}),n.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,n);else{var q=this[d].apply(this,n);
+c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(z){c(null,"Invalid Call: An error occured, "+z.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(p){null!=b&&b(p)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
+"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
+function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(G){console.log(G)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(G){console.log(G)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
+{};try{f=JSON.parse(a.data)}catch(v){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(v){console.log(v)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(m){null!=b&&b(m)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,k){this.openDatabase(mxUtils.bind(this,function(c){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=c.transaction(k,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<k.length;c++)f.objectStore(k[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(x){null!=e&&e(x)}}),e)};EditorUi.prototype.removeDatabaseItem=
+function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(p){null!=d&&d(p)}}),d)};EditorUi.prototype.getDatabaseItems=
+function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(p){null!=b&&b(p)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();
+e.onsuccess=function(){a(e.result)};e.onerror=b}catch(t){null!=b&&b(t)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
+null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
+a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
+function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,b,d,e,k,n,p,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,b,d,e,k,n,p,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,b)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,b,d,e,k,n,p,q,u,z,D,I,y,B,E,F){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,b,d,e,k,n,p,q,
+u,z,D,I,y,B,E,F)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,b,d,e)};EditorUi.prototype.convertImageToDataUri=function(a,b){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,b)};
+EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,b,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,b,d,e)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,
+b,d,e,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=
+function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,e,d,k,n){function u(){for(var a=D.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==D&&b++;I.style.display=0==b?"block":"none"}function q(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}x={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),u()):e();x=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);x=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function c(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
+[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function f(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function g(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function l(a){a.style.border="";a.removeChild(a.busyImg)}function m(b,d,e,k,n){function v(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});T.appendChild(e);d&&(e.style.display="none")}function y(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=B;a(b);return{pdiv:d,replies:c}}function A(c,d,e,n,p){function u(){f(A);b.addReply(v,function(a){v.id=a;b.replies.push(v);l(A);e&&e()},function(b){t();g(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,p)}function t(){q(v,A,function(a){u()},!0)}var x=y().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var A=m(v,b.replies,x,k+1);d?t():u()}if(n||!b.isResolved){I.style.display="none";var B=document.createElement("div");B.className="geCommentContainer";B.setAttribute("data-commentId",b.id);B.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(B.style.backgroundColor="ghostWhite");
+var z=document.createElement("div");z.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;z.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";z.appendChild(C);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,b.user.displayName||"");C.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",b.id);c(b,
+F);C.appendChild(F);B.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,b.content||"");B.appendChild(z);b.isLocked&&(B.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";z.appendChild(T);t||b.isLocked||0!=k&&!p||v(mxResources.get("reply"),function(){A("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||t||b.isLocked||(v(mxResources.get("edit"),
+function(){function c(){q(b,B,function(){f(B);b.editComment(b.content,function(){l(B)},function(b){g(B);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),v(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){f(B);b.deleteComment(function(a){if(!0===a){a=B.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var c=B.querySelectorAll(".geCommentAction");for(a=
+0;a<c.length;a++)c[a].parentNode.removeChild(c[a]);l(B);B.style.opacity="0.5"}else{c=y(b).replies;for(a=0;a<c.length;a++)D.removeChild(c[a]);for(a=0;a<d.length;a++)if(d[a]==b){d.splice(a,1);break}I.style.display=0==D.getElementsByTagName("div").length?"block":"none"}},function(b){g(B);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));t||b.isLocked||0!=k||v(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=
+a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=y(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);E||(e[g].style.display="none")}u()}b.isResolved?A(mxResources.get("reOpened")+": ",!0,c,!1,
+!0):A(mxResources.get("markedAsResolved"),!1,c,!0)});B.appendChild(z);null!=e?D.insertBefore(B,e.nextSibling):D.appendChild(B);for(e=0;null!=b.replies&&e<b.replies.length;e++)z=b.replies[e],z.isResolved=b.isResolved,m(z,b.replies,null,k+1,n);null!=x&&(x.comment.id==b.id?(n=b.content,b.content=x.comment.content,q(b,B,x.saveCallback,x.deleteOnCancel),b.content=n):null==x.comment.id&&x.comment.pCommentId==b.id&&(D.appendChild(x.div),q(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return B}}var t=
+!a.canComment(),p=a.canReplyToReplies(),x=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",D=document.createElement("div");D.className="geCommentsList";D.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;D.style.bottom=parseInt(z)+7+"px";C.appendChild(D);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(I,mxResources.get("noCommentsFound"));var y=document.createElement("div");y.className="geToolbarContainer geCommentsToolbar";y.style.height=z;y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(y.style.filter="none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter="none");if(!t){var B=z.cloneNode();B.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+B.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(B,"click",function(b){function c(){q(d,e,function(b){f(e);a.addComment(b,function(a){b.id=a;F.push(b);l(e)},function(b){g(e);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var d=a.newComment("",a.getCurrentUser()),e=m(d,F,null,0);c();b.preventDefault();mxEvent.consume(b)});y.appendChild(B)}B=z.cloneNode();B.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
+B.setAttribute("title",mxResources.get("showResolved"));var E=!1;"dark"==uiTheme&&(B.style.filter="invert(100%)");mxEvent.addListener(B,"click",function(a){this.className=(E=!E)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});y.appendChild(B);a.commentsRefreshNeeded()&&(B=z.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',B.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(B.style.filter="invert(100%)"),
+mxEvent.addListener(B,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),y.appendChild(B));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){n();a.preventDefault();mxEvent.consume(a)}),y.appendChild(z));C.appendChild(y);var F=[],H=mxUtils.bind(this,function(){this.hasError=
+!1;if(null!=x)try{x.div=x.div.cloneNode(!0);var b=x.div.querySelector(".geCommentEditTxtArea"),c=x.div.querySelector(".geCommentEditBtns");x.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(A){a.handleError(A)}D.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=
+a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});D.innerHTML="";D.appendChild(I);I.style.display="block";F=a;for(a=0;a<F.length;a++)b(F[a].replies),m(F[a],F,null,0,E);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(D.appendChild(x.div),q(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(a){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
+(a&&a.message?": "+a.message:""));this.hasError=!0})):D.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;y=mxUtils.bind(this,function(){function a(b){var e=d[b.id];if(null!=e)for(c(b,e),e=0;null!=b.replies&&e<b.replies.length;e++)a(b.replies[e])}if(this.window.isVisible()){for(var b=D.querySelectorAll(".geCommentDate"),d={},e=0;e<b.length;e++){var f=b[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<F.length;e++)a(F[e])}});setInterval(y,6E4);this.refreshCommentsTime=
+y;this.window=new mxWindow(mxResources.get("comments"),C,b,e,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},ConfirmDialog=
+function(a,b,e,d,k,n,u,q,c,f,g){var l=document.createElement("div");l.style.textAlign="center";g=null!=g?g:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=g+"px";m.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(m.style.height="60px");mxUtils.write(m,b);l.appendChild(m);null!=f&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",f),m.appendChild(b),l.appendChild(m));f=document.createElement("div");
+f.style.textAlign="center";f.style.whiteSpace="nowrap";var t=document.createElement("input");t.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(t.checked)});n.className="geBtn";null!=q&&(n.innerHTML=q+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");a.editor.cancelFirst&&f.appendChild(n);var p=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&
+e(t.checked)});f.appendChild(p);null!=u?(p.innerHTML=u+"<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";a.editor.cancelFirst||f.appendChild(n);l.appendChild(f);c?(f.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.appendChild(t),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),m.appendChild(k),l.appendChild(m),
+mxEvent.addListener(k,"click",function(a){t.checked=!t.checked;mxEvent.consume(a)})):f.style.marginTop="12px";this.init=function(){p.focus()};this.container=l};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
@@ -3672,11 +3674,11 @@ EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.page
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 a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
-this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,c=0;c<e.length;c++)if(e[c]instanceof SelectPage||e[c]instanceof RenamePage||e[c]instanceof MovePage||e[c]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),l=a.getAttribute("background"),t=a.getAttribute("backgroundImage"),t=null!=t&&0<t.length?JSON.parse(t):null,c=a.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=
-a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:null,backgroundImage:null!=t?new mxImage(t.src,t.width,t.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:c||[]}};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),n=a.getAttribute("background"),u=a.getAttribute("backgroundImage"),u=null!=u&&0<u.length?JSON.parse(u):null,q=a.getAttribute("extFonts");if(q)try{q=q.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(c){console.log("ExtFonts format error: "+c.message)}return{gridEnabled:"0"!=
+a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:null!=u?new mxImage(u.src,u.width,u.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(k)?"undefined"===
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:q||[]}};
Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
@@ -3691,85 +3693,85 @@ Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var d="extFont_"+a;if(null==
d=!0;for(k=0;k<e.length;k++)if(e[k].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:b})}}};
EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var e=this.editor.extractGraphModel(a.node,null,b),d=Editor.extractParserError(e);if(d)throw Error(d);null!=e?(a.graphModelNode=e,a.viewState=this.editor.graph.createViewState(e),d=new mxCodec(e.ownerDocument),a.root=d.decode(e).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){e=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(e))throw Error(d);null!=e&&(a.graphModelNode=
e)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(l){this.handleError(l)}};
+EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();d.add(k);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(n){this.handleError(n)}};
EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(l){this.handleError(l)}return e};
+EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(n){this.handleError(n)}return e};
EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage,l+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
-this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var c=this.createControlTab(4,"&nbsp;&#10095;");
-c.style.position="absolute";c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(t,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<b.scrollLeft?100:50);mxUtils.setOpacity(c,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+e)/this.pages.length)+1),k=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(n,this.createTabForPage(this.pages[n],d,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
+this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var 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 q=this.createControlTab(4,"&nbsp;&#10095;");
+q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(u,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(u,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(u,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
"none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
-EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=
-0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var d=this.currentPage;null!=d&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
-function(){this.removePage(d)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(d,mxResources.get("copyOf",[d.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
+EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=
+0;d<this.pages.length;d++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var c=this.currentPage;null!=c&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,
+function(){this.removePage(c)}),b),a.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(d,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),l=a.getId();e.setAttribute("title",k+(null!=l?" ("+l+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var t=new mxPopupMenu(this.createPageMenu(a));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);this.resetCurrentMenu();t.destroy()});var c=mxEvent.getClientX(l),f=mxEvent.getClientY(l);t.popup(c,f,null,l);this.setCurrentMenu(t,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),n=a.getId();e.setAttribute("title",k+(null!=n?" ("+n+")":"")+" ["+d+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&k||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!d){var u=new mxPopupMenu(this.createPageMenu(a));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 q=mxEvent.getClientX(n),c=mxEvent.getClientY(n);u.popup(q,c,null,n);this.setCurrentMenu(u,b)}mxEvent.consume(n)}}))};
EditorUi.prototype.getLinkForPage=function(a,b,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),k=k+((0==k.length?"?":"&")+"page-id="+a.getId());null!=b&&(k+="&"+b.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+"#"+d.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){var k=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);null!=this.getLinkForPage(a)&&(e.addSeparator(d),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,c,f,e,m){b=this.createUrlParameters(b,d,c,f,e,m);c||b.push("hide-pages=1");k.isSelectionEmpty()||(c=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,e=k.view.scale,c.width/=e,c.height/=e,c.x=c.x/e-d.x,c.y=c.y/e-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
-f=new EmbedDialog(this,this.getLinkForPage(a,b,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(b,d,e,c,f,g){b=this.createUrlParameters(b,d,e,c,f,g);e||b.push("hide-pages=1");k.isSelectionEmpty()||(e=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,f=k.view.scale,e.width/=f,e.height/=f,e.x=e.x/f-d.x,e.y=e.y/f-d.y,b.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
+c=new EmbedDialog(this,this.getLinkForPage(a,b,c));this.showDialog(c.container,440,240,!0,!0);c.init()}))})));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),d))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,k){k.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(k.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(k.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,l,t,c){e=null!=e?e:!1;null==l&&(l=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var d=l.slice(),g=0;g<l.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(l[g]),"treeFolding","0")&&this.foldTreeCell(b,l[g]);l=d;l=a.apply(this,arguments)}finally{this.model.endUpdate()}return l};Graph.prototype.foldTreeCell=
-function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,e){null!=e&&d.push(e);a!=b&&d.push(a);return a==b||!this.model.isCollapsed(a)}));this.model.setCollapsed(b,a);for(var e=0;e<d.length;e++)this.model.setVisible(d[e],!a)}finally{this.model.endUpdate()}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return x.isVertex(a)&&
-e(a)}function b(a){var b=!1;null!=a&&(b="1"==q.getCurrentCellStyle(a).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function c(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),
-null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var d=q.model.getParent(a),e=q.getIncomingEdges(a),f=q.cloneCells([e[0],a]);q.model.setTerminal(f[0],
-q.model.getTerminal(e[0],!0),!0);var g=c(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=b?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=b?a.geometry.height+10:-f[1].geometry.height-10;q.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=q.view.getState(a),m=q.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-f[1].geometry.width-
-10)*m:n.y+=(b?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=q.getOutgoingEdges(q.model.getTerminal(e[0],!0));if(null!=p){for(var t=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,u=k=e=0;u<p.length;u++){var x=q.model.getTerminal(p[u],!1);if(g==c(x)){var v=q.view.getState(x);x!=a&&null!=v&&(t&&b!=v.getCenterX()<l.getCenterX()||!t&&b!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,
-(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}t?k=0:e=0;for(u=0;u<p.length;u++)if(x=q.model.getTerminal(p[u],!1),g==c(x)&&(v=q.view.getState(x),x!=a&&null!=v&&(t&&b!=v.getCenterX()<l.getCenterX()||!t&&b!=v.getCenterY()<l.getCenterY()))){var A=[];q.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});q.moveCells(A,(b?1:-1)*e,(b?1:-1)*k)}}}return q.addCells(f,d)}finally{q.model.endUpdate()}}function g(a){q.model.beginUpdate();try{var b=c(a),d=q.getIncomingEdges(a),
-e=q.cloneCells([d[0],a]);q.model.setTerminal(d[0],e[1],!1);q.model.setTerminal(e[0],e[1],!0);q.model.setTerminal(e[0],a,!1);var f=q.model.getParent(a),g=f.geometry,k=[];q.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);q.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?l=0:b==mxConstants.DIRECTION_NORTH?(l=0,m=-m):b==mxConstants.DIRECTION_WEST?(l=-l,m=0):b==mxConstants.DIRECTION_EAST&&
-(m=0);q.moveCells(k,l,m);return q.addCells(e,f)}finally{q.model.endUpdate()}}function m(a,b){q.model.beginUpdate();try{var d=q.model.getParent(a),e=q.getIncomingEdges(a),f=c(a);0==e.length&&(e=[q.createEdge(d,null,"",null,null,q.createCurrentEdgeStyle())],f=b);var g=q.cloneCells([e[0],a]);q.model.setTerminal(g[0],a,!0);if(null==q.model.getTerminal(g[0],!1)){q.model.setTerminal(g[0],g[1],!1);var k=q.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)q.setCellStyles(m,l[m],
-[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&q.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[g[0]])}catch(fa){}}var e=q.getOutgoingEdges(a),n=d.geometry,k=[];q.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=q.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var t=q.view.getBounds(k),u=q.view.translate,x=q.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-g[1].geometry.width)/
-2:(t.x+t.width)/x-u.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=null==t?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(t.x+t.width)/x-u.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==t?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(t.y+t.height)/x-u.y+-n.y+
-10);return q.addCells(g,d)}finally{q.model.endUpdate()}}function p(a,b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var d=c(a),e=b==mxConstants.DIRECTION_EAST||
-b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=b?v.actions.get("selectParent").funct():d==b?(e=q.getOutgoingEdges(a),null!=e&&0<e.length&&q.setSelectionCell(q.model.getTerminal(e[0],!1))):(d=q.getIncomingEdges(a),null!=d&&0<d.length&&(e=p(q.model.getTerminal(d[0],!0),e,a),d=q.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&q.setSelectionCell(e[d].cell)))))}
-var v=this,q=v.editor.graph,x=q.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(q.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(q.getSelectionCell())&&(b.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
-v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=
-[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,
-c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=q.removeCells;q.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];x.isEdge(g)&&e(g)&&(d.push(g),g=x.getTerminal(g,!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=q.getIncomingEdges(b[f]),
-b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var z=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,
-b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var E=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||
-q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var t=q.getIncomingEdges(b[0]);if(0<t.length){var u=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=u){var x=q.view.getState(m);null!=x&&(c=(x.getCenterX()-u.getCenterX())/q.view.scale,d=(x.getCenterY()-u.getCenterY())/q.view.scale)}}}}l=E.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&
-0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var A=v.sidebar.dropAndConnect;
-v.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=
-v.onKeyDown;v.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?g(q.getSelectionCell()):m(q.getSelectionCell()):13==b.which&&(c=f(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),
-q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(n(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(n(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=q.connectVertex;q.connectVertex=function(b,d,e,k,l,n,p){var t=q.getIncomingEdges(b);if(a(b)){var u=c(b),x=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,v=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?m(b,d):x==v?g(b):f(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};q.getSubtree=function(c){var d=
-[c];!b(c)&&!a(c)||t(c)||q.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingEdges(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();
-mxEvent.consume(a)})))};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.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 u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=a?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.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 a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
-new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
-a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);e.insertEdge(k,!1);var p=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};');
-p.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;b.insertEdge(n,!0);p.insertEdge(n,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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};');
-v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(k);a.insert(n);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(p);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
+b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(k.relatedPage.root=a.decodeCell(d,!1),k=d.nextSibling,d.parentNode.removeChild(d),d=k;null!=d;){k=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,n,u,q){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var c=n.slice(),d=0;d<n.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[d]),"treeFolding","0")&&this.foldTreeCell(b,n[d]);n=c;n=a.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
+function(a,b){this.model.beginUpdate();try{var d=[];this.traverse(b,!0,mxUtils.bind(this,function(a,c){null!=c&&d.push(c);a!=b&&d.push(a);return a==b||!this.model.isCollapsed(a)}));this.model.setCollapsed(b,a);for(var e=0;e<d.length;e++)this.model.setVisible(d[e],!a)}finally{this.model.endUpdate()}};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return x.isVertex(a)&&
+e(a)}function b(a){var b=!1;null!=a&&(b="1"==p.getCurrentCellStyle(a).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function q(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),
+null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],
+p.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=p.view.getState(a),l=p.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-
+10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var n=p.getOutgoingEdges(p.model.getTerminal(d[0],!0));if(null!=n){for(var u=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<n.length;t++){var x=p.model.getTerminal(n[t],!1);if(f==q(x)){var y=p.view.getState(x);x!=a&&null!=y&&(u&&b!=y.getCenterX()<k.getCenterX()||!u&&b!=y.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,y)&&(d=10+Math.max(d,(Math.min(m.x+m.width,y.x+y.width)-Math.max(m.x,y.x))/l),g=10+Math.max(g,
+(Math.min(m.y+m.height,y.y+y.height)-Math.max(m.y,y.y))/l))}}u?g=0:d=0;for(t=0;t<n.length;t++)if(x=p.model.getTerminal(n[t],!1),f==q(x)&&(y=p.view.getState(x),x!=a&&null!=y&&(u&&b!=y.getCenterX()<k.getCenterX()||!u&&b!=y.getCenterY()<k.getCenterY()))){var v=[];p.traverse(y.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function f(a){p.model.beginUpdate();try{var b=q(a),c=p.getIncomingEdges(a),
+d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&
+(l=0);p.moveCells(g,k,l);return p.addCells(d,e)}finally{p.model.endUpdate()}}function g(a,b){p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=q(a);0==d.length&&(d=[p.createEdge(c,null,"",null,null,p.createCurrentEdgeStyle())],e=b);var f=p.cloneCells([d[0],a]);p.model.setTerminal(f[0],a,!0);if(null==p.model.getTerminal(f[0],!1)){p.model.setTerminal(f[0],f[1],!1);var g=p.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),l;for(l in k)p.setCellStyles(l,k[l],
+[f[0]]),"edgeStyle"==l&&"elbowEdgeStyle"==k[l]&&p.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[f[0]])}catch(U){}}var d=p.getOutgoingEdges(a),m=c.geometry,g=[];p.view.currentRoot==c&&(m=new mxRectangle);for(k=0;k<d.length;k++){var n=p.model.getTerminal(d[k],!1);null!=n&&g.push(n)}var u=p.view.getBounds(g),t=p.view.translate,x=p.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/
+2:(u.x+u.width)/x-t.x-m.x+10,f[1].geometry.y+=f[1].geometry.height-m.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=null==u?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(u.x+u.width)/x-t.x+-m.x+10,f[1].geometry.y-=f[1].geometry.height+m.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+m.x+40):f[1].geometry.x+(f[1].geometry.width-m.x+40),f[1].geometry.y=null==u?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(u.y+u.height)/x-t.y+-m.y+
+10);return p.addCells(f,c)}finally{p.model.endUpdate()}}function l(a,b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||
+b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=l(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}
+var t=this,p=t.editor.graph,x=p.getModel(),C=t.menus.createPopupMenu;t.menus.createPopupMenu=function(b,c,d){C.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(p.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(p.getSelectionCell())&&(b.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};
+t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=
+[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,
+c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+D");var z=p.removeCells;p.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];x.isEdge(g)&&e(g)&&(d.push(g),g=x.getTerminal(g,!1));if(a(g)){var k=[];p.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=p.getIncomingEdges(b[f]),
+b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return z.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var D=p.duplicateCells;p.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=D.call(this,
+b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=p.getIncomingEdges(k[e]),g=p.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,p.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var I=p.moveCells;p.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<b.length;q++)if(a(b[q])||
+p.model.isEdge(b[q])&&null==p.model.getTerminal(b[q],!0)){f=p.model.getParent(b[q]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var u=p.getIncomingEdges(b[0]);if(0<u.length){var t=p.view.getState(p.model.getTerminal(u[0],!0));if(null!=t){var x=p.view.getState(m);null!=x&&(c=(x.getCenterX()-t.getCenterX())/p.view.scale,d=(x.getCenterY()-t.getCenterY())/p.view.scale)}}}}l=I.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))a(m)&&
+0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(a(b[q])&&(u=p.getIncomingEdges(b[q]),0<u.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==p.getIncomingEdges(l[q]).length){n=m;if(null==n||n==p.model.getParent(b[q]))n=p.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,p.getDefaultParent(),n,l[q])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var y=t.sidebar.dropAndConnect;
+t.sidebar.dropAndConnect=function(b,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=y.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=p.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var B={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},E=
+t.onKeyDown;t.onKeyDown=function(b){try{if(p.isEnabled()&&!p.isEditing()&&a(p.getSelectionCell())&&1==p.getSelectionCount()){var d=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==b.which?d=mxEvent.isShiftDown(b)?f(p.getSelectionCell()):g(p.getSelectionCell()):13==b.which&&(d=c(p.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=d&&0<d.length)1==d.length&&p.model.isEdge(d[0])?p.setSelectionCell(p.model.getTerminal(d[0],!1)):p.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())),
+p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=B[b.keyCode];null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(m(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(m(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(b))}}catch(N){t.handleError(N)}mxEvent.isConsumed(b)||E.apply(this,arguments)};var F=p.connectVertex;p.connectVertex=function(b,d,e,k,l,m,n){var u=p.getIncomingEdges(b);if(a(b)){var t=q(b),x=t==mxConstants.DIRECTION_EAST||t==mxConstants.DIRECTION_WEST,y=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return t==d||0==u.length?g(b,d):x==y?f(b):c(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};p.getSubtree=function(c){var d=
+[c];!b(c)&&!a(c)||u(c)||p.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!u(this.state.cell)&&0<this.graph.getOutgoingEdges(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(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;t.hoverIcons.reset();
+mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.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 v=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){v.apply(this,arguments);null!=this.moveHandle&&
+(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.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 a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",
+new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+d.vertex=!0;var 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;b.insertEdge(c,!0);d.insertEdge(c,!1);a.insert(c);a.insert(b);a.insert(d);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
+a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+d.vertex=!0;var 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;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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;b.insertEdge(g,!0);e.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 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;b.insertEdge(m,!0);k.insertEdge(m,!1);var t=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};');
+t.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;b.insertEdge(p,!0);t.insertEdge(p,!1);a.insert(c);a.insert(g);a.insert(m);a.insert(p);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];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};');
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;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.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-a.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"};');b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var c=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"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);c.insertEdge(e,!1);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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);g.insertEdge(k,!1);a.insert(e);a.insert(k);a.insert(d);a.insert(c);a.insert(g);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(a,"treeRoot",
+a.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"};');b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+e.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;d.insertEdge(c,!0);e.insertEdge(c,!1);var f=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"};');f.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;d.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(c);a.insert(g);a.insert(d);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(a,"treeRoot",
"1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;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.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.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;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
+b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.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;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,c.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(null!=b?b:!a.formatWindow.window.isVisible());
a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a,b){var c=a.editor.graph;c.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(c.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,c.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries||
"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,
@@ -3782,20 +3784,20 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
(this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
"#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;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=this.tabContainerHeight+"px");l.apply(this,arguments)};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var c=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
-e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):c.apply(this,arguments)};var f=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){f.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
-"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var g=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){g.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=EditorUi.prototype.updateTabContainer;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");n.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 q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
+e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var c=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){c.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var f=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){f.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className=
-"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var m=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
-!0;m.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
+"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=
+!0;g.apply(this,arguments);mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
-this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
+this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var l=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
-this.menus.findWindow=null);p.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){n.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+this.menus.findWindow=null);l.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){m.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
+EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+"...";c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");
c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();c.menus.addSubmenu("extras",a,b,mxResources.get("preferences"));a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,
@@ -3806,12 +3808,12 @@ c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs")
c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);c.menus.addSubmenu("units",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,
function(a,b){c.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);c.menus.addSubmenu("table",a,d);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,
function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",
-b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
+b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],b)})))};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}p=n.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var b=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=b}q=n.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>e)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);b=c("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([b,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=e&&(b=l.actions.get("undo"),a=l.actions.get("redo"),b=d("",b.funct,null,mxResources.get("undo")+" ("+b.shortcut+")",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
@@ -3819,58 +3821,58 @@ a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;b
f([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=e?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=e?d("",b.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==S&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor=
-"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),S=b),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=S&&(S.parentNode.removeChild(S),S=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=e||null!=urlParams.clibs||
-null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(b=t.addMenu("",a.funct),b.setAttribute("title",mxResources.get("language")),b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.globeImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="24px 24px",b.style.position="absolute",b.style.height="24px",b.style.width="24px",b.style.zIndex="1",b.style.right="8px",b.style.cursor=
+"pointer",b.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(b),O=b),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}p.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=e||null!=urlParams.clibs||
+null!=urlParams.libs)&&b(this,!0);1E3<=e&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
-l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var J=
-l.menus.get("viewZoom");if(null!=J){this.tabContainer.style.right="70px";var B=t.addMenu("100%",J.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
-"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);J=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);l.editor.addListener("resetGraphView",J);l.editor.addListener("pageSelected",J);var P=l.setGraphEnabled;l.setGraphEnabled=function(){P.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
-k.appendChild(u);l.updateTabContainer();var S=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,l,t){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=l;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\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\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\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\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
-GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
-GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
-this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;
-this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,
-null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
-mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var c=this.xmlNode.getElementsByTagName("diagram");if(0<c.length){if(null!=this.pageId)for(var e=0;e<c.length;e++)if(this.pageId==c[e].getAttribute("id")){this.currentPage=e;break}var g=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=c[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+
-1:"pagecount"==a?c.length:g.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
-[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
-!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var l=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,
-function(){this.treeCellFolded=!0;return l.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),d())}));l.observe(k,{attributes:!0})}else d()}};
+l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,v=document.createElement("div");v.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
+l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var A=t.addMenu("100%",K.funct);A.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");A.style.whiteSpace="nowrap";A.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";A.style.backgroundPosition="right 6px center";A.style.backgroundRepeat="no-repeat";A.style.backgroundColor="#ffffff";A.style.paddingRight="10px";A.style.display="block";A.style.position="absolute";A.style.textDecoration="none";A.style.textDecoration=
+"none";A.style.right="0px";A.style.bottom="0px";A.style.overflow="hidden";A.style.visibility="hidden";A.style.textAlign="center";A.style.color="#000";A.style.fontSize="12px";A.style.color="#707070";A.style.width="59px";A.style.cursor="pointer";A.style.borderTop="1px solid lightgray";A.style.borderLeft="1px solid lightgray";A.style.height=parseInt(l.tabContainerHeight)-1+"px";A.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";v.appendChild(A);K=mxUtils.bind(this,function(){A.innerHTML=Math.round(100*
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var T=l.setGraphEnabled;l.setGraphEnabled=function(){T.apply(this,arguments);null!=this.tabContainer&&(A.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}v.appendChild(l.tabContainer);v.appendChild(n);v.appendChild(l.diagramContainer);
+k.appendChild(v);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,k,n,u){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=k;this.isResolved=n;this.user=u;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\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\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\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.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\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\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\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\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\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\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.center=!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.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;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.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?
+this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:
+!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});
+this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);
+var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var c=0;c<e.length;c++)if(this.pageId==e[c].getAttribute("id")){this.currentPage=c;break}var f=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==
+a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:"pagecount"==a?e.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};
+c=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)});this.addListener("xmlNodeChanged",c);c();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||
+1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&
+a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);
+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"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),n=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(n.disconnect(),d())}));n.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),
-d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),
+c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+
-2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var l=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(l);this.handlingResize||(l=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||
-9>=document.documentMode||this.graph.addListener("size",d);var t=mxUtils.bind(this,function(c){c=null!=c?c:new mxPoint;var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)?(c=null,null!=e&&b.height+2*this.graph.border>e-2&&(c=(e-2*this.graph.border-
-2)/b.height),this.fitGraph(c)):this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+c.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+c.y),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(a){b=this.graph.getGraphBounds();
-k=null;t(a)}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var l=null!=b?b.getModel():null,t=a.getModel();t.beginUpdate();try{for(var c=t.getChildCount(t.root),f=0;f<c;f++)t.setVisible(t.getChildAt(t.root,f),null!=b?l.isVisible(l.getChildAt(l.root,f)):!1);if(null==l)if(k)for(f=0;f<d.length;f++)t.setVisible(t.getCell(d[f]),!0);else for(f=0;f<e.length;f++)t.setVisible(t.getChildAt(t.root,
-parseInt(e[f])),!0)}finally{t.endUpdate()}}};
+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=k=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||
+9>=document.documentMode||this.graph.addListener("size",d);var u=mxUtils.bind(this,function(d){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;0<a.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)?(d=null,null!=e&&b.height+2*this.graph.border>e-2&&(d=(e-2*this.graph.border-
+2)/b.height),this.fitGraph(d)):this.widthIsEmpty||null!=d||0!=this.graphConfig.resize||""==a.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-b.y/this.graph.view.scale)+d.y),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(u,0):u();this.positionGraph=
+function(a){b=this.graph.getGraphBounds();k=null;u(a)}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,k=null!=d&&0<d.length;if(0<e.length||k||null!=b){var n=null!=b?b.getModel():null,u=a.getModel();u.beginUpdate();try{for(var q=u.getChildCount(u.root),c=0;c<q;c++)u.setVisible(u.getChildAt(u.root,c),null!=b?n.isVisible(n.getChildAt(n.root,c)):!1);if(null==n)if(k)for(c=0;c<d.length;c++)u.setVisible(u.getCell(d[c]),!0);else for(c=0;c<e.length;c++)u.setVisible(u.getChildAt(u.root,
+parseInt(e[c])),!0)}finally{u.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);m++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),t=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(t(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){t(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||t(30)}));var c=this.graph,f=c.getTolerance();c.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=c.container.scrollLeft;this.scrollTop=c.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-c.container.scrollLeft)<f&&Math.abs(this.scrollTop-c.container.scrollTop)<f&&Math.abs(this.startX-b.getGraphX())<f&&Math.abs(this.startY-b.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?l():t(30))}})}for(var g=this.toolbarItems,m=0,p=null,n=null,v=0;v<g.length;v++){var q=g[v];if("pages"==q){n=b.ownerDocument.createElement("div");
-n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(n);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");y.style.paddingLeft="0px";y.style.paddingRight="0px";q=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=n.style.display;y.style.display=n.style.display});this.addListener("graphChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),
-p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=z.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);p.style.left=b.x+a.left+
-"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(q=this.graphConfig["toolbar-buttons"][q],
-null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,
-70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var E=b.style.border,g=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),
-p=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==p)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()};
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,k=null,n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),u=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(u(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){u(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){u(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?n():u(30))}})}for(var f=this.toolbarItems,g=0,l=null,m=null,t=0;t<f.length;t++){var p=f[t];if("pages"==p){m=b.ownerDocument.createElement("div");
+m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");x.style.borderRightStyle="none";x.style.paddingLeft="0px";x.style.paddingRight="0px";e.appendChild(m);var C=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";p=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";x.style.display=m.style.display;C.style.display=m.style.display});this.addListener("graphChanged",p);p()}else if("zoom"==p)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==p){if(this.layersEnabled){var z=this.graph.getModel(),D=a(mxUtils.bind(this,function(a){if(null!=l)l.parentNode.removeChild(l),
+l=null;else{l=this.graph.createLayersDialog();mxEvent.addListener(l,"mouseleave",function(){l.parentNode.removeChild(l);l=null});a=D.getBoundingClientRect();l.style.width="140px";l.style.padding="2px 0px 2px 0px";l.style.border="1px solid #d0d0d0";l.style.backgroundColor="#eee";l.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";l.style.fontSize="11px";l.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(l,80);var b=mxUtils.getDocumentScrollOrigin(document);l.style.left=b.x+a.left+
+"px";l.style.top=b.y+a.bottom+"px";document.body.appendChild(l)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){D.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});D.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==p?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(p=this.graphConfig["toolbar-buttons"][p],
+null!=p&&a(null==p.enabled||p.enabled?p.handler:function(){},p.image,p.title,p.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.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;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
+70),e.appendChild(f),this.filename=f);this.minToolbarWidth=34*g;var I=b.style.border,f=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-
+c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==I&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),
+l=null);b.style.border=I});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==l)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",f):f()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
@@ -3879,20 +3881,20 @@ window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
-"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var l=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),t=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",l);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;t.apply(this,arguments)};var c=k.editor.graph,f=c.container;f.style.overflow="hidden";this.lightboxChrome?(f.style.border="1px solid #c0c0c0",f.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",l)):(b.style.display="none",e.style.display="none");var g=this;c.getImageFromBundles=function(a){return g.getImageUrl(a)};var m=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=m.apply(this,arguments);a.getImageFromBundles=function(a){return g.getImageUrl(a)};return a};
-this.graphConfig.move&&(c.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(f.style,"border-radius","4px"),f.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(f.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(f.style,"transition","all .25s ease-in-out"));this.addClickHandler(c,k);window.setTimeout(mxUtils.bind(this,function(){f.style.outline="none";
-f.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(f);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(f.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(f.style.position="absolute",f.style.display="block",f.style.left=
-a.x+"px",f.style.top=a.y+"px",f.style.width=document.body.clientWidth-80+"px",f.style.height=document.body.clientHeight-80+"px",f.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(c,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;k.refresh=function(){};var n=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),u=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",n);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
+!0;u.apply(this,arguments)};var q=k.editor.graph,c=q.container;c.style.overflow="hidden";this.lightboxChrome?(c.style.border="1px solid #c0c0c0",c.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",n)):(b.style.display="none",e.style.display="none");var f=this;q.getImageFromBundles=function(a){return f.getImageUrl(a)};var g=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=g.apply(this,arguments);a.getImageFromBundles=function(a){return f.getImageUrl(a)};return a};
+this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(c.style,"border-radius","4px"),c.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(c.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(c.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,k);window.setTimeout(mxUtils.bind(this,function(){c.style.outline="none";
+c.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(c);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(c.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(c.style.position="absolute",c.style.display="block",c.style.left=
+a.x+"px",c.style.top=a.y+"px",c.style.width=document.body.clientWidth-80+"px",c.style.height=document.body.clientHeight-80+"px",c.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
GraphViewer.prototype.updateTitle=function(a){a=a||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",a);null!=this.filename&&(this.filename.innerHTML="",mxUtils.write(this.filename,a),this.filename.setAttribute("title",a))};
GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var k=d[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(d[e]))}return b};
GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){k(a)}):k(d.xml)}};
GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function t(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function n(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function u(b,c){if(!b.resizedAttached)b.resizedAttached=
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,t,C,G,F=function(){if((C=b.offsetWidth)!=p||(G=b.offsetHeight)!=t)m=!0,p=C,t=G;g()},I=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",F);I(f,"scroll",F)}var c=function(){GraphViewer.resizeSensorEnabled&&d()},f=Object.prototype.toString.call(e),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(g)for(var f=0,m=e.length;f<m;f++)t(e[f],c);else t(e,c);this.detach=function(){if(g)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==n(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),l=!1),a(m))};a(m);var q,u,B,E,F=function(){if((B=b.offsetWidth)!=q||(E=b.offsetHeight)!=u)l=!0,q=B,u=E;g()},H=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};H(d,"scroll",F);H(f,"scroll",F)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,g=e.length;c<g;c++)u(e[c],q);else u(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 542800ad..93d41239 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
- "revision": "a5cd35568a32d957ce902c2a59110720"
+ "revision": "3806ed77fe997ff8b32b9ab89f42f371"
},
{
"url": "js/extensions.min.js",
diff --git a/src/main/webapp/shortcuts.svg b/src/main/webapp/shortcuts.svg
index 81ad6cc8..867d1e84 100644
--- a/src/main/webapp/shortcuts.svg
+++ b/src/main/webapp/shortcuts.svg
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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="1134px" viewBox="-0.5 -0.5 1428 1134" content="&lt;mxfile modified=&quot;2020-04-06T13:56:45.836Z&quot; host=&quot;test.draw.io&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36&quot; etag=&quot;TwhuhZR0s7vZZ6_upWna&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;7Z1pd9q8Esc/Tc7p86I53peXrAktSxJI0uadsR3jBDDXmLB8+it5AywR8tyicS8op03AGBtmfpY1f0kzV3JtsroJrdmoEzju+EoSnNWVXL+SJEOR0W+8YZ1uUIVkgxf6TrJpZ0Pf37jJRjHbuvAdd55uSzZFQTCO/Nn+RjuYTl072ttmhWGw3N/tNRg7extmlufufQy8oW9bY5fY7dl3olG6VVOV7Qu3ru+NslOLmpm8MrTsdy8MFtP0hFeS3Ih/kpcnVnaw9MTzkeUEy51NcuNKroVBECWPJquaO8a23bdb88Cr+QcP3Wn0lTdoz0O1+7RxF/XI7r8bne/ruvxdVtJP92GNF272ReKPG60zG6FPPsMP/UlszOqHG0Y+MmHbGrrju2DuR34wRa8PgygKJmiHMX6hmtunFoyDMD6U/Br/7ByjMvY9/N4omKGt1nyWOPnVX7noc1fjU1ayrUK2BT12rMi6kivJU6k5//CupOpqgr5x7e62K72sq8rwebWwN4Jv3T4Idj34aMuO7KxVubNWP+yJ/dF5qyw7NXPjTGy/dTuKhjfqpjcdza1nNbzr/wic24dlzzc+0Lvk9tTetCfm+mVtrHqDd7UtJ/u1/KpsPT8IVl3wO4OXpVtredbN0+xFGgl3/daqO60qaB/Jen6S7yemgrYtW/WK13m7x//ReV/G9rQ7G0qK2XprLDr9Fvoed7fVkXPjebb8sB5K0Ri9663zNva7k99rdLSJ9byaF7a9o0/c7QweF93Bo9ftK2L3cbnq9Csr562z6NSdenetLLt+RWi/PUqt+r2Hnqsd9LxVb6ztDd7nEW8TurWK3Krbi96gK7UHLbT9xxv+26vfR+23e6U9eIw6vqJ2a4KIHqP9mhv0fNX10fO3+02r/hih86udp9+rzs0Snw/td7/o1p+0waChtt/e0T6N1e+1sOgM7KjTVza9vrDoblr4uMg7wqr99nvdHnTQOcfz9qCB3tvy0H5CZ9JB3w8da4POW/fwNvRdkNXw6z767JK3br9V1u67sOqsKyv8HZ235Dtk50HnxPvK6POj4zS8DtonPsdbMz3XPf5MQvemg76vjb7ToxBvH7yjc75H8Xn8CvqMlY07ETbtN0/F9unWf8zjzxi/do++X3LczuB3/Nm7fQF9tsf4M3f85H1WTYg/b2KLe3R8O7Yx/k6xPfrKEh1vjbe5fuvj7m35Ycsv0zsPX074XzW9fNHl5K4Otgxi3t6gdtwNJm4UrtEu6RsUXbhWdXP7kxxgnbXUhppsWG4bSEm5NtKWf7TTOu5sttKG2ctPt22b0IO0eaI3VfLxNiluWHATETcKy5Efuf2ZZeNXl+hGhbaNItQYyHURPXz1x+OdRqgZ/6Dt8ygM3t3slWkwxa3bazCNdnZOfnJDE1al2P6goUVB2DOtkt09dyybt8i7dpWFPzeqcilG1UlcmRlVvRCjqrJxbZpEE3HUxOKfm1i7FBMLOhy3+qUYVZfgjGpciFE1QYEzqnkpRtUMuDZV/ELUdx5WlTU4VEXxQqyqCyKgVaVLsaoMGA2IlxJj6RpgOCBeSpClm1/trJ7ibnUpUZaRMQjC6qUEVoYGGAOIlxJZGSZgECBeSmhlSmpZOot4KZGWKEqAzax0KaGWKBhfjWBPYdZLibVEQQUMYTMrXoBZpa9GWydoWy9mRMs0AZWBixnSMtWv9gNOYdVzjbYUrcTR17MdxipatcSRwrMd1SJsDDmqdbbDWkWrgg5rne24FmFVyHEt+VyDLcKqkONa8rnGWkS7CjkFQz7XUIvoZ0FOyJLPNdIqWhV0DFY+10iLsCrkGKx8KZEW6BisfCmRFugYrHwpsRXoGKx8KbEV6BisfCmxFegY7FdWip2FVU3pq7HVCdpV5VJiK1ANW7mU2Er88ijWKax6KbGVqAL2V5VLia1EA1BdUS4ltsrn7YBY9VJiK0kV9kexvtrROkWX4FJCLVkEFLGVSwm1JAMyKLiUUEtWACe3qecaahGzsCC7r+q5hlqEVSG7r+q5hlqEVSG7r+q5hlpFq4J2X9VzDbUIq5bYfVXPNfIijAzZ0VLPNfIqWhU0KFDPNdQirArafT3XUMuQyuy+nmuoRVgVsvuqnWuoRVgVsvuqnWuoVbQqaPc1G0M/f6sWu69ftPEJeq/auQZehI0he6/auQZeRauC9l61c420CKtC9l61s420RKNMs55tqEWYFbQNONdYizAr7A3rXIMt0qyqeC3s/Hx1VcEJ+lr6ucZepJEhwwT9XIMvwqygMW225vYCzAopwOjnGnCRZoVUC/VLibhoWRx0gZVVLyXioq3ZZGfVc424ilalrS9mZ9VzDbgIq8rmXg9W+qKNT9GDPdfoi7AxJeMIO3LPNfgqWlXTjLJiL+NcY6+ijUHXyRvnGnoRVoVc0W2ca+RFWBUy+4BxroEXYVVT32tlAfM+GpcShYGumjcuJQoDXTVvXEoUBrpq3riUKKzEzOXGpURhoGvojUuJwmBTQZuXEniBpoI2LyXwgk0Hb15K5AVbvMC8lNALttSGea7RFjGUWKJwaJ5r8EUYGVQ5NM81+iLNCilymecafpFmhVRkzXONuEizFsRDyJb2XAMwwsgmZOb9fGnkBdj1y1niT4CrKJxrDEbaVQPUYcRsQsP521X8evt6EsOSYVh/5L9GV1K1MY3ckLAy+l7o/FVr7HtTtGXsvuKn+Av7tjWupJujANt7jszvT712vE9d2W55SL8F3hSg976OgyV6OvIdx0Vvr4ZBZEXWMD4nduYs8KdR/DXVKvqHvnhNuFavVPSBaui5uH2O/uHdQ+SvKfKl5ceeca15tHTn0Se+xNv76dcUT+JYZd+vqnYsHQUKFPfus5lvdp2e5WX9M6eTQeKnzqZfFDtXULqJQ/FvoTD2p22J5Nw4OCjIoLaJn+MjSALnoww+JOloDhs4PsjofIePgTXcsjK3OSnQpKjyNRn8igoUHKTGUItCtEu1mmPR4lBAQ2Hsj0cbpOoE13yQcklKyCPnApgLWdT/ntsKqfCkXFznLQe2LGcEmJEsAWsZUIikPCWCEPA3OdffxL4VthgO8Gesf1dOJD1kw1h5F0IiPU7RHcSTeJgUyrruEm1o+8hbaMcp+tUMwokVRa6Dt1tDdzznzcAnzYBwAiikrD3OZQsyJJVoi15Oc92TMl9CxZ0VWl5ozUYcjb8HDYNUgKkNxmnQoAiVkRVGON50/Ai5ICMB/Q1e0a++O3bthJDkYJwPUD7yQ8A0HaSm2cc+2cXDmmIYKrPZGH/sp3hPTgUwFVShgiEXpKw5CDxvjDsZ1WCMgGi2IuRFGzcb0/1mY4BZ4IAAA1IULSBhITXOHJbHqeOG46R3ykH5C0CRRVA0SIWzv5i54dwO/RlyfrO/GGaPOR9/BR8UBSNPQnV6Pkh981s2kv5PPDrC3c9UwFL0wtiqpO6LVeQ8ILMgZ4ms2CA1zsoYg8EJKZUQirYhMruBSKSmmXm/Hloe9z609ynyBVSDkH/6YoPAiSiRCJpgwbA9ILXOdOBre1eocAagGaDKE2DtAilypkxkSLSu8lk2nA1oNgyyC8mwfSAFzYSF1P8ZEbWxb79zFoBZoIkP+Syo07NAiphJf4E7vxTn0+ZGMBv5kkhRMpGW0LZuLCylLcJd6H74wYKPhLJWmtTCzIn8+tzlIUsgfXoeKEpkxkNt5OMhjQyI5EtyHIBxUPVjyhNDOkgdsuJgJKIg16R9rE9zKGChKCz1gIWCFCAf3AmyPNr2GgYTTkaJZBCLPADBkCmiZHYvqYy3wUYX+5aDAQyGKl8rR6ZpM+t1ZsuhaWQ8xa5z51stwvFc3u0E54OmRygaKyBIvTKfG7Fz8xD6yM68rYBm4StLOhRmdxHK3Mw8Ikn2rbrYB5wKYCpoQoXMrIUgFctEpeoEizluJpYj1+XzcJmrVVmZybw6kHKsf6kxQ4IULtMBDc5EmUyoAoUCmVlfklQwuftLdb8i7kUWlLEMdjBQ5Mt0KItDUSoUunKkhhRDKEjVMsndlEWYiT8kYZIiwifIlECIJhybmi9qzAg5uE6cz5kqEwlZP9a5ZNZoKKR4WUACWWsah6GcClgqdIGWjYYdCRSxMkXgFh2O+x/Y/zqlwBRD75PKZAOv9OROh3W6DHrJk5ojv9TL8Lp2LDk0QwYOTZHMOwC3nAdoHkzzWi2Lh4Nq4w/OATAHRjZeCON5UmEstAScAHACtPL0JOVQPkp0QpyR8lt3MZlZzj8cCmAoTMkoTXlWDqWgFL5zJEpEQgPtIxzUEQXueeg7hHmsXio7DlSKeGhNPyw8qe0liKfEtqboKL0Flw9ZT1vR5OKMBYqSILGavaRSxEM7dN0pjQThW8ey+T0CmgjqfIUsX+npiSAFxbxteEp9hR4iSgKeVxCeBUWkDS6ozO4UlEXZGQ23Qehv0PflPJTIg06Z68qOBlJzvLPwrSJjgnsf1PsabSEVu14jRWEM3XjCezZRJVtXlc5f4TjA4iBTFAV2jQEpO9b9eWxR1CAkkw98ZCGOATQG9AkI7EAg9UY+GlmC36kTD9h5nRQUH9zX0J2PuOOhHU+bfMDO8bT11HM3Xhvpu3ydE7j3j09CYMaCRgqJTR+T8OxPHb7mDZ4FPAEB0v+kfJj4/87yeAcA2vvUaQfsfE8KhYnvB8sgJYD3/cER0CD1II2iDi7mUTxskIwecPfDuv/4oCI7GEhxcGcEiYMACsIXppqwA4HUCVMQ+HhyCSTQZpiw8z1lLmKSpjPJwWZni5LSelT2OE6uJHyzk3ko9nbnmnRVyV5HJ0YHlpN6kOmkRpty3H9w3dRkLdz2ENkp8yNkJ3PyHdMPgt9ewDMMFlPHxV9PJOmjQ7tTv1L6zPEk3Cdwv5Jd6lnqNYGSn1HKZoPt+j/b9mf+J1UhwqTzkTXDD/0JDhKQUecz7B+5/uqvsKWr6Qt1B12LV3IleSo1Z7iOWc1/qvYelsLPGy+ooJ9u/3HUePTwQwP/eql4HfSnNuiqq1e8ofZU7Tw1fsUDFMV/+B21ntm5m+M9K78e+oNxp3LfG/5+wUdsPvx4aDQf3ab6tH5r/PTqlfuH7s3dQ78iG5Wq9qPxPH9897zIHLVv6kNnPFIHM/1Brd9tqpXGT0XrtaRH+37khDcvP5Fvm9OKKFfNe3X0n2XDf0MAWu9PPtq+btY7P5pvbeNp/OgskX+r3u1q+Iz+/p574/ijVX88PKqN8P2H53nYivjfQbJOgZGuovvH9g6SVc/OqMqz+O+1KpRGRT0FVJRpa7sXf9xq41bEFPAlj5tpfD3b70t/7u63CNnO5IV+2vvQBN1R8JGpd5mvthBMmgNK3iwpW1+85znhBJ7TD6xSlStXOIk3VoiEum+NAy9u4wWcMid+rRf6Hq51WrvKkn3Hm1veNAixp3912pfqwTxR/q4HVUqDfhoPkgpPYXEBa0f8f3fpTjF11MiSS+Upl5Wj+c6YpebXSdmnAESPAwENhHp0CIAdDwfLdnQ4B9AcUMo6GUDlW/Sj61HvOA/APHwhuzK7duHgetQ84xXnAZqHLyRVZgcEKQ3FLrB5GZcyUDhaadpgBgI5X6wpcgCAAZBV4cgKZXYAkCJhnk27ba3dEK8u4DNIQIYLTKmg7NHK+ejMSCCVvZyE3iJKK85zFMpBoRBVUnQndmQYpHLYcOLpJR03suKRAc4DMA+GcVR2YscDqUPmLUUzCCdWMutsynPngnPxhSiTHRakGpk2E0/J95GEm93jci4AucDlhI9U/WIHBkWWRN83KRnZcacLjgM0DkcjTnYJlA1KdY5hwGcjgUNAK8piyqy8fqhy8LbIfDozIK0DOPcdd2iFnIpPqGChRSiKekSLkJitajZIWXIfknRtMxav/9lWnRbiel/WLjSCH7l8yjM4O7p2pPcpKczYOVzOg2Pyd2GiCvslaClZlhi2MZTke5yPv4sPnFhnhw/KHCt2eJAqKC/iUDIOhXpAkDiYpPS5TawRurNxnFsFz4zczqaPmxEnRH6UhG/p38gKPTea/7M7ixKdJp5CiUdY7EUYWywDizPGNhYSBZPo9hJYKSKrcoQmqaC2pnP06TEL6WqMhCe8IRph2uZxJVPXye9KwrejHPEEgfAgZUPqMCCRmutD0ip9Bs7SR58sezme8xG/ymurl8BLsTNMibeZCbMmVZjNmp3FNG2DYjhwnxgz8rpPlOvw5AIlQFOom0kJoNhBQ5lcmvd94mU9yaIyxEo+a+Cbny0WsfNkZNgosSv4TQqeH0qqSllgdpM6PP2Uu/4T17MIpnBCOuVTic5k1nAcrY3CcYDGQRfkI7E1OxwOlUapvnAMoDGQ91exkSEMOwxIPTYZ88kahQqnAZoGTSuNBlJ+vQ3GONCIoeAggIJgyLQM91Tn63/ufEkgxdZCB+GGIwCNQKF4GrmclVVbIGXnInHgqxfBMTC1kvqJUqaIkRj85hgAY4BTmX1eVJUdBgfXtmc3Bx42gONAyWfGDoCji9p/cQCgATDlI4MX7HA4KCr+5BgAY4AT2x1JccmOg6OqIucBngcVkgBSSGzMbe50cKcb5pFFJewQOCQipmsKkmnj9XguFscCFgtRInsFIquxRkkgBcS+FddB4zXx2K8wIkaXpGOrUVmtB0CIHQCBMwDKQFwB7VPJgCEDpIL4OHUCzgB0OyCrx3IismOAIh/uzkGqhGGw5LcGcCSOV8pihwQpJbbyGdQja+qM3WT+o+OGV9k02UmwmPO7BzQmhnwsn0UuDO9hcoL8+QhAApM8zYkXot04DMAwFMYiKdmx2LUZpNx4F2LLcAiAISiMRFKCS3YQUNJmurg/KXxL8qLxuczgPMRDkpAMkGpjxkDbny5W6AAdy+YcgHNAq63EjgJScEwW8KFtgzixEXc/rPtNSkZEdu4nVcbc/Q8otLSmHl/EC85APAypltQ3kEi9MUeiMR77Mx49lgCEqu+Fj5Adhfzj7whP1tTGSTGFSqo+cR6AechGIGEIIKXHZhDihBHCw2I4dMNhstQ/GZ3M62ndhMGCj1OCs0Ebp5RYLdyXJFKDTMaqudsPuv0Uw9OiWFgKa9JSoYowhXokiSIxWjhfTNIwjOKlL5wIYCJkqqIAxgRFafSn9oiDAA6CTpEUwDAgtcakadhJvmHH7+FYwGIh0pa/wHFB6o+dIJ7glO6Z9CbvLDy4jQKODz7viX1+DVn4QqeCXZzxSQ2fftxaJFMdEjJ2Qw/OBTAXMjmAnefFOD0XpEr5EgQ8nym822kdCYlVcyCTSiQvt1AuAPQuAzsCKNLjIpyj7809D91ZpNVwk4D6ijIpQObJjDkP5fCgakcLd4HhcXBJNaejJDqKZd1KhOPocmsOSTmQoE3Hpk6DQXKoqg9npGRGCvXeymTkUFEfzkZJbBgUcQqMhoNZH7Mm4w4v2H3kA+DgXMiisc8AFRNWXFDK8lC4qAdLPm0GngzFPBq0MFO3ZVLF7NthsDPWkY5/JKNhwrdZxGdfs1e4itNnaDqHYjJiQiElzgIEyQItYe5veBGUEmhQyZyxDGkg5c4HF3t+r1G4iksvoRtJb5aOh8W/+GKNUgAxKNKGwarTqZA6KAEIbzDK5CE/xl5BclYDowpF+BzH1Y/2i29xDsA5wLoF5K2DVDnzzuWdxUsblUAATZ1g53/asm73ww8Wc05ASQTIIpk5TmRV4VNSSHmym0yV4N4vxfsq5BId5agc+cAR+AQBJnKTplMQEJghcFB5bHDXQ7tep82TYud6UlosXP11jgA4AoVaVJTOADMgVFJXLE564ECAA1EoRwUKBGUm5T4QTxwIcCBMc29yA0UwYAcEKSXWxq4Vok1199Va4JkNQvLtOResQwfhC/1GZiPWKikiNhyfu78091P7juzcT1EO3Sg5Km8LyodBps67ZwUDpRhNMFtz95fmfo0yAM3O/aSGeIeM4HL/l+Z/3EWEJICiIz4+9HsPV/mC7MpNA/352fjNq5x/HjGkz/HwPHqKP+ZJgghd3iOENgFBp6WSPgkelBXavV6bk1ACCYaolAgCZTJjo92oDVq9LocBHgYluzLLgEEj1cZ2pdrgzUIZJJgltgoaRWWsdJ8qHIQyQNjvJygiRVRiRwIpLz61Gs+cgzJuDUqZIJDqYr9Vb1Qr24ii1ut2Uc+Bs1F+HxKYDYr0OPjdbvDbRTmBZWEUIpvQBMMCqTzWe7XHTqPLG4a/oGEAhoFUoX6662FghQ6WIkfIZvYiYp0PcIJcjI/8f8uGsM+GpJ+GDckQ9tgQaWlmJdoiGFXM9vwjPHSyc1nLFjoIES5hY6H/TX8VJxe9C3h5K/bKtVToZdLLJausdGud7GamyRn4Cpgv3UMC/Ekj7DxdOFWHgiBCPDb/idn8aJ3samYposa+/c7x+BSPE/QniLUR+hEWDGYo0Ma4eVpJwHuFKcn/EgZROw0Nj3M37A3fkp7C2Bq64+StvZmL11D7+JcTWstrP7i+vk4OP/an78leoyiaoXNVYtmiuVwur9N949M1FyE+WrKTpOLdVLyjWtgVPZ9nPdjr+UdaKmOLp7Zju5TdHRbDAJfzdVLnF1CjE7oTHUikl5uCoQtqwcsKnexT3BUkQbnWtj968R5B0auzG8mu88V/XxkXPd3x/6HW4ehCmk5SQFlYjlyXZ61nfeNQCoQoOmVCDLtuJWVNTZqKXkhSUAst1GY0ewvew2R919DkL5AgsZIkdMoSmyS0SHJw3CUG5RAw7jrIlPlRn6f6YhZTGOSw937SyDuOA+O7QzGswDgon/YkTWY0kGPfed3MNLjASSIFy8GiVFzVxHXwwuy0H8pRYSxQCeZ+V5OS6EtittzGICXLerDABpUE+zMF4qz9eppVVcUEboVll1/IPc2q02CQqqQEcqH/Tb5OQ09hS+UAf8b6d4WJ7ChJ8rWkq4YmCZphamphYpxOXXZJ+l88if8Pqo552q7X+KaAfPs9dO1FOPfj7H9eUjpVCNPd0IeRYwumb++4kUUexUZWc0PXuapJVxXiGAXstkKCeBohYet1EtqDQ2unaACkbOHktjoupWnPlrbsXeTmKZxM6okHL/LYFwevQXyZWYsomKdG/pfN/85l9dUL8iTtr2lcyzs/BV8YZJRGW72QXYN/5gpy/YrI29tdME7hcKNww1UhW9RD8lw6lywLvRq4JYylWqHrLtHvth+nxUv2qsxmY/yNYr23b71aoU+0scUDzu3kcHntc7xIFhn3ohpWlYyvGTaspPh28Gq+wIZVIS87dg3rwQQzv0Da1//fAAdiZF1R1GOFVJiJYCYpgmUD65yM8smgaeTsWDiYZIYnlymfBVUwSpt+Y5LyV0rGDSejfDKUfF4mDA0H6/Vlve1HTkX5VOiUKd/smDgolbW3Ydve6FqbM1I6IxrogKtJmbmXZjiNw/2Mkzono3wyZP1YBVAFaBTGJFXBqmW/Y29hSSiWzuvu2I14fpu/gBtd2BvBL5Obg1MBOS1/CS3UVHlgfBxMuP3A0SgfjUL65TIbEkqynCwrP31wluMCjouml6WhysIhDTWrC7k/2s9ZKZsVelI+dnwc1FVv0dE4EKUDYcji8XsNKzgOSqsNXAKOs1E2G5pcHhtHhVbegPwdkJiAOlqeY/YwFrzp+BuoMCXjuBbCipGDWmvGSJUTUj4hmlDWmK4skLJqgZAmJ6R8QkyqQsaKCVIy3R+0w4fgCb3Kx0IUJBU2hj0olmZo/OZY/AVY0CZzs4Pi0LTSwuTremiR86w5HfB0mPuKuQTIikgRSXnWBfC8bopCuWuwyr8hixTlM65HxL0O63X9aOlKdgyQAmdalIhDAArBFyYQs4OAVDJvkvWtHAJYCOhzhdk5ntQqH6ced30ZrqdNCGbneFKAbAc4T0bzcTqOH6RBQlqstI3T9HEkYJHQBO1YQMAOEFJ/rC9mY+Qw3jeAB0EG7Q2QMmM2JVPoowd2FGf+xm/jKdnAUdAF2B4CqSzmMCx9dH4EQp6pj+MAjQN1ii47GEhFcbAIp3ln4QEbGJNhCjhLDraoUMPdiaU/53cNcDZoxa2z0pInZyPLjrDDRgfbworTgNyFATYRbyPK4IBW5ZpZGyGRomLfxRNektoheG0QJwCYADMrHQlDACkpoi89tmZxYm9cDQBZBi8o5BSAUmDIkAGkRGqKjdXMilsCzkBpDGiQKpNEyouNVawncXm5FO/TJsKy8z6pMWYrybn7S+kGSLRacgwBoCwND+OkfklfsBkGvHYcPAW0OYvsGKAs884S6WayQdoaCHwJXjnxIX3BHTskKJMVx66F7wvP1jo1aGH8aRAE48jntwxoNkRBonQZdI0VGqTAWMkyi3LXQ7ueNluVWasgU2YgjoM4rbAd79qs+3M7L0SbVPfgSAAjkSUk3UOCVWsgk1KiPcHdBh+ZxbXwo+AV8xHPaq7hp7O0YFRhDwsvk0jz+E8su9dPkvhzgBKA9PiHAEjeS7xsXJ1k2nM+zyUvT3lNqRWjsIOKVCcJDPbLQC5HfuT243xWcn0ZWtipo2iCy1GKBS5wxcf45yBEB67cExhWFAuVww2ZvFhl2gzybL8/syup952rXTXpSDITupXFU1iZVNT2l4DxjOGfr+Q4BQ9mUVc/WnmbVeUrWSY1tn0eeG5oeB40Za9qIiW2ZscDZdlwvKRD6PMYin2HWcyzP3w25kYrJHEa75NiW7qYg7u/HPfjpgAOgMlrZbP+oUa/GnLvsWfMbhr94XcaFQQJ85E1ww/9ieW5O75t4+qZd8Hcj+MquT4MoiiYoB3ispp4MocXd+p2rPsa/xzkw5rP4gLh9Vd/hbuC1fiUlWyrkG1Bjx3Ew5VcSZ5Kzbiae3U1wbHe3W1XellXleHzamFvBN+6fRDsevDRlh3ZWatyZ61+2BP7o/NWWXZq5saZ2H7rdhQNb9RNbzqaW89qeNf/ETi3D8ueb3ygd8ntqb1pT8z1y9pY9QbvaltO9mv5Vdl6fhCsuuB33l6Wbq3lWTdPsxdpJNz1W6vebVVB+0gvv35srGdzgbe13xrofC+zl19ObSh7Zuut4nVqlXXXr6x6tRYuX3tbHTk3nveCjjrsV1at+m9vUKusurWK1Gosvc7g3uv0q51WvSW16u/Za+jdeFtDQP/X8X7ovR2/qqFPsHFuf3xY0qPZ8ruTl8lvv3XzMhveLNHzzrr33JJe3lp+e6MYbRlZb6Ngf52ki6xoJuoBbZOpGMVqOjLZR5YoAd7/UHaeuAa056Hafdq4i3pk99+Nzvd1Xf4uK6SUcCVp46xx2LsYtP8sguyF70lRI1yaCtlotX0RPfLwX8e3vNCazK8Lh7PzC2L7DvlVMHScxGG76X897dSNshMigyTnTF45uLlwxTvWfJSHYsEiGvtTN53Jm27cicUKLf+40CqEiQsPthp53axik5C/kLU/kxWy5mx0vXSH48AL5tdOaC39QCbjQbGiVit5I55qFCrZ2O/vt7Oim7xRHcCecnEcvgMI+7GiZF7r5A1AphT1yrb9C/bR0zDAWOSv3WDjdQLHxXv8Fw==&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(238, 238, 238);"><defs><clipPath id="mx-clip-25-143-112-26-0"><rect x="25" y="143" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-175-112-26-0"><rect x="25" y="175" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-207-112-26-0"><rect x="25" y="207" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-240-132-26-0"><rect x="25" y="240" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-272-112-26-0"><rect x="25" y="272" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-304-112-26-0"><rect x="25" y="304" width="112" height="26"/></clipPath><clipPath id="mx-clip-25-336-112-26-0"><rect x="25" y="336" width="112" height="26"/></clipPath><clipPath id="mx-clip-102-234-10-20-0"><rect x="102" y="234" width="10" height="20"/></clipPath><clipPath id="mx-clip-120-143-192-26-0"><rect x="120" y="143" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-175-202-26-0"><rect x="120" y="175" width="202" height="26"/></clipPath><clipPath id="mx-clip-120-207-192-26-0"><rect x="120" y="207" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-240-192-26-0"><rect x="120" y="240" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-272-192-26-0"><rect x="120" y="272" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-304-192-26-0"><rect x="120" y="304" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-336-211-26-0"><rect x="120" y="336" width="211" height="26"/></clipPath><clipPath id="mx-clip-385-111-82-26-0"><rect x="385" y="111" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-143-92-26-0"><rect x="385" y="143" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-175-82-26-0"><rect x="385" y="175" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-207-92-26-0"><rect x="385" y="207" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-240-82-26-0"><rect x="385" y="240" width="82" height="26"/></clipPath><clipPath id="mx-clip-385-272-92-26-0"><rect x="385" y="272" width="92" height="26"/></clipPath><clipPath id="mx-clip-385-304-99-26-0"><rect x="385" y="304" width="99" height="26"/></clipPath><clipPath id="mx-clip-385-336-102-26-0"><rect x="385" y="336" width="102" height="26"/></clipPath><clipPath id="mx-clip-506-111-147-26-0"><rect x="506" y="111" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-143-147-26-0"><rect x="506" y="143" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-175-147-26-0"><rect x="506" y="175" width="147" height="26"/></clipPath><clipPath id="mx-clip-506-207-147-26-0"><rect x="506" y="207" width="147" 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-272-138-26-0"><rect x="506" y="272" width="138" height="26"/></clipPath><clipPath id="mx-clip-506-304-137-26-0"><rect x="506" y="304" width="137" height="26"/></clipPath><clipPath id="mx-clip-506-336-128-26-0"><rect x="506" y="336" width="128" height="26"/></clipPath><clipPath id="mx-clip-378-431-158-26-0"><rect x="378" y="431" width="158" height="26"/></clipPath><clipPath id="mx-clip-378-495-122-26-0"><rect x="378" y="495" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-527-122-26-0"><rect x="378" y="527" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-560-122-26-0"><rect x="378" y="560" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-592-152-26-0"><rect x="378" y="592" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-624-122-26-0"><rect x="378" y="624" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-657-122-26-0"><rect x="378" y="657" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-689-122-26-0"><rect x="378" y="689" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-721-122-26-0"><rect x="378" y="721" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-753-122-26-0"><rect x="378" y="753" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-786-122-26-0"><rect x="378" y="786" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-818-122-26-0"><rect x="378" y="818" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-850-122-26-0"><rect x="378" y="850" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-915-122-26-0"><rect x="378" y="915" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-947-122-26-0"><rect x="378" y="947" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-882-122-26-0"><rect x="378" y="882" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-431-117-26-0"><rect x="548" y="431" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-495-144-26-0"><rect x="548" y="495" width="144" height="26"/></clipPath><clipPath id="mx-clip-548-528-142-26-0"><rect x="548" y="528" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-560-142-26-0"><rect x="548" y="560" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-592-122-26-0"><rect x="548" y="592" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-624-142-26-0"><rect x="548" y="624" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-657-142-26-0"><rect x="548" y="657" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-689-142-26-0"><rect x="548" y="689" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-721-142-26-0"><rect x="548" y="721" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-753-142-26-0"><rect x="548" y="753" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-786-142-26-0"><rect x="548" y="786" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-818-142-26-0"><rect x="548" y="818" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-850-142-26-0"><rect x="548" y="850" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-882-142-26-0"><rect x="548" y="882" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-915-142-26-0"><rect x="548" y="915" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-947-142-26-0"><rect x="548" y="947" width="142" height="26"/></clipPath><clipPath id="mx-clip-405-1067-239-20-0"><rect x="405" y="1067" width="239" height="20"/></clipPath><clipPath id="mx-clip-405-1104-258-20-0"><rect x="405" y="1104" width="258" height="20"/></clipPath><clipPath id="mx-clip-745-111-92-26-0"><rect x="745" y="111" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-143-92-26-0"><rect x="745" y="143" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-175-72-26-0"><rect x="745" y="175" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-207-92-26-0"><rect x="745" y="207" 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-272-72-26-0"><rect x="745" y="272" width="72" height="26"/></clipPath><clipPath id="mx-clip-745-336-72-26-0"><rect x="745" y="336" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-111-162-26-0"><rect x="834" y="111" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-143-162-26-0"><rect x="834" y="143" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-175-162-26-0"><rect x="834" y="175" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-207-162-26-0"><rect x="834" y="207" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-240-162-26-0"><rect x="834" y="240" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-272-152-26-0"><rect x="834" y="272" width="152" height="26"/></clipPath><clipPath id="mx-clip-834-336-85-26-0"><rect x="834" y="336" width="85" height="26"/></clipPath><clipPath id="mx-clip-745-431-222-26-0"><rect x="745" y="431" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-463-232-26-0"><rect x="745" y="463" width="232" height="26"/></clipPath><clipPath id="mx-clip-745-495-222-26-0"><rect x="745" y="495" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-528-222-26-0"><rect x="745" y="528" width="222" height="26"/></clipPath><clipPath id="mx-clip-745-560-222-26-0"><rect x="745" y="560" width="222" height="26"/></clipPath><clipPath id="mx-clip-1005-431-408-26-0"><rect x="1005" y="431" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-463-408-26-0"><rect x="1005" y="463" width="408" height="26"/></clipPath><clipPath id="mx-clip-1005-495-262-26-0"><rect x="1005" y="495" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-527-262-26-0"><rect x="1005" y="527" width="262" height="26"/></clipPath><clipPath id="mx-clip-1005-560-298-26-0"><rect x="1005" y="560" 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-689-82-26-0"><rect x="745" y="689" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-721-82-26-0"><rect x="745" y="721" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-753-82-26-0"><rect x="745" y="753" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-818-82-27-0"><rect x="745" y="818" width="82" height="27"/></clipPath><clipPath id="mx-clip-745-850-82-26-0"><rect x="745" y="850" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-882-82-26-0"><rect x="745" y="882" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-915-82-26-0"><rect x="745" y="915" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-947-82-26-0"><rect x="745" y="947" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-979-82-26-0"><rect x="745" y="979" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1011-82-26-0"><rect x="745" y="1011" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1044-82-26-0"><rect x="745" y="1044" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1076-82-26-0"><rect x="745" y="1076" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1108-98-26-0"><rect x="745" y="1108" width="98" height="26"/></clipPath><clipPath id="mx-clip-845-689-132-26-0"><rect x="845" y="689" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-657-132-26-0"><rect x="845" y="657" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-721-132-26-0"><rect x="845" y="721" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-753-132-26-0"><rect x="845" y="753" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-817-195-28-0"><rect x="845" y="817" width="195" height="28"/></clipPath><clipPath id="mx-clip-845-850-132-26-0"><rect x="845" y="850" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-882-132-26-0"><rect x="845" y="882" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-915-132-26-0"><rect x="845" y="915" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-947-132-26-0"><rect x="845" y="947" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-979-132-26-0"><rect x="845" y="979" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1012-132-26-0"><rect x="845" y="1012" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1044-132-26-0"><rect x="845" y="1044" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1076-132-26-0"><rect x="845" y="1076" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1108-208-26-0"><rect x="845" y="1108" width="208" height="26"/></clipPath><clipPath id="mx-clip-1105-892-102-26-0"><rect x="1105" y="892" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-925-102-26-0"><rect x="1105" y="925" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-957-102-26-0"><rect x="1105" y="957" width="102" height="26"/></clipPath><clipPath id="mx-clip-1105-989-102-26-0"><rect x="1105" y="989" width="102" height="26"/></clipPath><clipPath id="mx-clip-1215-892-132-26-0"><rect x="1215" y="892" width="132" height="26"/></clipPath><clipPath id="mx-clip-1215-925-188-26-0"><rect x="1215" y="925" width="188" height="26"/></clipPath><clipPath id="mx-clip-1215-957-112-26-0"><rect x="1215" y="957" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-989-112-26-0"><rect x="1215" y="989" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-111-112-26-0"><rect x="1105" y="111" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-143-112-26-0"><rect x="1105" y="143" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-175-112-26-0"><rect x="1105" y="175" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-207-112-26-0"><rect x="1105" y="207" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-240-112-26-0"><rect x="1105" y="240" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-272-112-26-0"><rect x="1105" y="272" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-304-112-26-0"><rect x="1105" y="304" width="112" height="26"/></clipPath><clipPath id="mx-clip-1105-336-132-26-0"><rect x="1105" y="336" width="132" height="26"/></clipPath><clipPath id="mx-clip-1245-111-141-26-0"><rect x="1245" y="111" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-143-141-26-0"><rect x="1245" y="143" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-175-173-26-0"><rect x="1245" y="175" width="173" height="26"/></clipPath><clipPath id="mx-clip-1245-207-168-26-0"><rect x="1245" y="207" width="168" height="26"/></clipPath><clipPath id="mx-clip-1245-240-141-26-0"><rect x="1245" y="240" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-272-141-26-0"><rect x="1245" y="272" width="141" height="26"/></clipPath><clipPath id="mx-clip-1245-304-122-26-0"><rect x="1245" y="304" width="122" height="26"/></clipPath><clipPath id="mx-clip-1245-336-132-26-0"><rect x="1245" y="336" width="132" height="26"/></clipPath><clipPath id="mx-clip-1105-656-92-26-0"><rect x="1105" y="656" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-689-92-26-0"><rect x="1105" y="689" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-721-92-26-0"><rect x="1105" y="721" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-753-92-26-0"><rect x="1105" y="753" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-786-92-26-0"><rect x="1105" y="786" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-656-112-26-0"><rect x="1215" y="656" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-689-112-26-0"><rect x="1215" y="689" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-721-112-26-0"><rect x="1215" y="721" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-753-112-26-0"><rect x="1215" y="753" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-786-112-26-0"><rect x="1215" y="786" width="112" height="26"/></clipPath><clipPath id="mx-clip-1084-75-165-26-0"><rect x="1084" y="75" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-75-165-26-0"><rect x="725" y="75" width="165" height="26"/></clipPath><clipPath id="mx-clip-369-75-165-26-0"><rect x="369" y="75" width="165" height="26"/></clipPath><clipPath id="mx-clip-5-75-165-26-0"><rect x="5" y="75" width="165" height="26"/></clipPath><clipPath id="mx-clip-4-396-165-26-0"><rect x="4" y="396" width="165" height="26"/></clipPath><clipPath id="mx-clip-365-396-165-26-0"><rect x="365" y="396" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-396-165-26-0"><rect x="725" y="396" width="165" height="26"/></clipPath><clipPath id="mx-clip-1085-620-165-26-0"><rect x="1085" y="620" width="165" height="26"/></clipPath><clipPath id="mx-clip-725-620-165-26-0"><rect x="725" y="620" width="165" height="26"/></clipPath><clipPath id="mx-clip-191-0-273-52-0"><rect x="191" y="0" width="273" height="52"/></clipPath><clipPath id="mx-clip-165-1108-142-26-0"><rect x="165" y="1108" width="142" height="26"/></clipPath><clipPath id="mx-clip-25-1108-132-26-0"><rect x="25" y="1108" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-304-72-26-0"><rect x="745" y="304" width="72" height="26"/></clipPath><clipPath id="mx-clip-834-304-152-26-0"><rect x="834" y="304" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-463-142-26-0"><rect x="378" y="463" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-463-115-26-0"><rect x="548" y="463" width="115" height="26"/></clipPath><clipPath id="mx-clip-845-786-132-26-0"><rect x="845" y="786" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-785-82-26-0"><rect x="745" y="785" width="82" height="26"/></clipPath><clipPath id="mx-clip-120-111-192-26-0"><rect x="120" y="111" width="192" height="26"/></clipPath><clipPath id="mx-clip-25-111-112-26-0"><rect x="25" y="111" width="112" height="26"/></clipPath><clipPath id="mx-clip-130-780-10-20-0"><rect x="130" y="780" width="10" height="20"/></clipPath><clipPath id="mx-clip-91-140-10-20-0"><rect x="91" y="140" width="10" height="20"/></clipPath><clipPath id="mx-clip-25-431-132-26-0"><rect x="25" y="431" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-463-132-26-0"><rect x="25" y="463" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-495-132-26-0"><rect x="25" y="495" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-528-132-26-0"><rect x="25" y="528" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-560-132-26-0"><rect x="25" y="560" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-592-132-26-0"><rect x="25" y="592" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-624-132-26-0"><rect x="25" y="624" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-657-132-26-0"><rect x="25" y="657" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-689-132-26-0"><rect x="25" y="689" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-721-132-26-0"><rect x="25" y="721" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-753-132-26-0"><rect x="25" y="753" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-786-132-26-0"><rect x="25" y="786" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-818-132-26-0"><rect x="25" y="818" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-850-132-26-0"><rect x="25" y="850" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-882-132-26-0"><rect x="25" y="882" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-915-132-26-0"><rect x="25" y="915" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-947-132-26-0"><rect x="25" y="947" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-979-132-26-0"><rect x="25" y="979" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1012-132-26-0"><rect x="25" y="1012" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1044-132-26-0"><rect x="25" y="1044" width="132" height="26"/></clipPath><clipPath id="mx-clip-25-1076-132-26-0"><rect x="25" y="1076" width="132" height="26"/></clipPath><clipPath id="mx-clip-165-431-142-26-0"><rect x="165" y="431" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-463-142-26-0"><rect x="165" y="463" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-495-142-26-0"><rect x="165" y="495" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-528-142-26-0"><rect x="165" y="528" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-560-142-26-0"><rect x="165" y="560" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-592-142-26-0"><rect x="165" y="592" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-624-142-26-0"><rect x="165" y="624" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-657-142-26-0"><rect x="165" y="657" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-689-142-26-0"><rect x="165" y="689" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-721-151-26-0"><rect x="165" y="721" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-753-142-26-0"><rect x="165" y="753" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-947-142-26-0"><rect x="165" y="947" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-818-142-26-0"><rect x="165" y="818" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-850-142-26-0"><rect x="165" y="850" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-882-142-26-0"><rect x="165" y="882" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-915-142-26-0"><rect x="165" y="915" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-979-142-26-0"><rect x="165" y="979" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-786-142-26-0"><rect x="165" y="786" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1012-168-26-0"><rect x="165" y="1012" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1044-142-26-0"><rect x="165" y="1044" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1076-148-26-0"><rect x="165" y="1076" width="148" height="26"/></clipPath><clipPath id="mx-clip-485-17-448-26-0"><rect x="485" y="17" width="448" height="26"/></clipPath><clipPath id="mx-clip-1105-818-92-26-0"><rect x="1105" y="818" width="92" height="26"/></clipPath><clipPath id="mx-clip-1105-851-92-26-0"><rect x="1105" y="851" width="92" height="26"/></clipPath><clipPath id="mx-clip-1215-818-112-26-0"><rect x="1215" y="818" width="112" height="26"/></clipPath><clipPath id="mx-clip-1215-851-112-26-0"><rect x="1215" y="851" width="112" height="26"/></clipPath></defs><g><image x="377.08" y="1065.5" width="24.83" height="24.83" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHZlcnNpb249IjEuMSI+PHBhdGggc3Ryb2tlPSIjMjliNmYyIiBmaWxsPSIjMjliNmYyIiBkPSJNMTUuNTUgNS41NUwxMSAxdjMuMDdDNy4wNiA0LjU2IDQgNy45MiA0IDEyczMuMDUgNy40NCA3IDcuOTN2LTIuMDJjLTIuODQtLjQ4LTUtMi45NC01LTUuOTFzMi4xNi01LjQzIDUtNS45MVYxMGw0LjU1LTQuNDV6TTE5LjkzIDExYy0uMTctMS4zOS0uNzItMi43My0xLjYyLTMuODlsLTEuNDIgMS40MmMuNTQuNzUuODggMS42IDEuMDIgMi40N2gyLjAyek0xMyAxNy45djIuMDJjMS4zOS0uMTcgMi43NC0uNzEgMy45LTEuNjFsLTEuNDQtMS40NGMtLjc1LjU0LTEuNTkuODktMi40NiAxLjAzem0zLjg5LTIuNDJsMS40MiAxLjQxYy45LTEuMTYgMS40NS0yLjUgMS42Mi0zLjg5aC0yLjAyYy0uMTQuODctLjQ4IDEuNzItMS4wMiAyLjQ4eiIvPjwvc3ZnPg==" preserveAspectRatio="none"/><rect x="7" y="424" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="456" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="520" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="488" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="553" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="585" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="649" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="617" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="682" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="714" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="746" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="778" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="811" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="843" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="875" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="907" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1101" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1069" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1037" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1004" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="972" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="940" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="424" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="520" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="553" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="585" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="649" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="617" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="488" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="456" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="682" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="714" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="746" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="778" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="811" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="843" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="875" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="907" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="940" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="104" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="136" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="168" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="200" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="232" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="297" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="265" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="329" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="104" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="136" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="168" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="200" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="232" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="265" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="297" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="329" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="104" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="136" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="168" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="200" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="232" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="265" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="297" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="329" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="329" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="297" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="265" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="232" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="200" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="168" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="136" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="104" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="424" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="456" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="488" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="520" width="700" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="553" width="700" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="649" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="682" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="746" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="714" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="778" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="811" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="843" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="875" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="907" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="940" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1004" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="972" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1037" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1069" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1101" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="649" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="682" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="714" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="746" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="778" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="885" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="917" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="950" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="982" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="21" y="138" 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-143-112-26-0)" font-size="12px"><text x="26.5" y="155.5">Shift+Enter</text></g><rect x="21" y="170" 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-175-112-26-0)" font-size="12px"><text x="26.5" y="187.5">Enter</text></g><rect x="21" y="202" 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-207-112-26-0)" font-size="12px"><text x="26.5" y="219.5">F2 / Enter</text></g><rect x="21" y="234.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-240-132-26-0)" font-size="12px"><text x="26.5" y="252">F2 / Tab / Esc</text></g><rect x="21" y="267" 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-272-112-26-0)" font-size="12px"><text x="26.5" y="284.5">Ctrl+B / I</text></g><rect x="21" y="299" 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-304-112-26-0)" font-size="12px"><text x="26.5" y="316.5">Ctrl+U</text></g><rect x="21" y="331" 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-336-112-26-0)" font-size="12px"><text x="26.5" y="348.5">Ctrl+. / ,</text></g><rect x="102" y="233" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-102-234-10-20-0)" font-size="10px"><text x="103.5" y="244.5">1</text></g><rect x="116" y="138" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-143-192-26-0)" font-size="12px"><text x="121.5" y="155.5">New Line in Formatted Labels</text></g><rect x="116" y="170" width="210" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-175-202-26-0)" font-size="12px"><text x="121.5" y="187.5">New Paragraph in Formatted Labels</text></g><rect x="116" y="202" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-207-192-26-0)" font-size="12px"><text x="121.5" y="219.5">Start Editing Label of Selected Cell</text></g><rect x="116" y="234.5" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-240-192-26-0)" font-size="12px"><text x="121.5" y="252">Stop Editing and Apply Value</text></g><rect x="116" y="267" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-272-192-26-0)" font-size="12px"><text x="121.5" y="284.5">Toggle Bold/Italic on Selected Text</text></g><rect x="116" y="299" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-304-192-26-0)" font-size="12px"><text x="121.5" y="316.5">Toggle Underline on Selected Text</text></g><rect x="116" y="331" width="219" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-336-211-26-0)" font-size="12px"><text x="121.5" y="348.5">Superscript/Subscript on Selected Text</text></g><rect x="381" y="106" 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-111-82-26-0)" font-size="12px"><text x="386.5" y="123.5">(Shift+)Tab</text></g><rect x="381" y="138" 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-143-92-26-0)" font-size="12px"><text x="386.5" y="155.5">Alt+(Shift+)Tab</text></g><rect x="381" y="170" 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-175-82-26-0)" font-size="12px"><text x="386.5" y="187.5">Shift+Drag</text></g><rect x="381" y="202" 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-207-92-26-0)" font-size="12px"><text x="386.5" y="219.5">Alt+Shift+Drag</text></g><rect x="381" y="234.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-240-82-26-0)" font-size="12px"><text x="386.5" y="252">Ctrl+(Shift+)A</text></g><rect x="381" y="267" 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-272-92-26-0)" font-size="12px"><text x="386.5" y="284.5">Ctrl+Shift+I / E</text></g><rect x="381" y="299" width="107" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-weight="bold" clip-path="url(#mx-clip-385-304-99-26-0)" font-size="12px"><text x="386.5" y="316.5">Ctrl / Shift+Click</text></g><rect x="381" y="331" 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-336-102-26-0)" font-size="12px"><text x="386.5" y="348.5">Alt+Click</text></g><rect x="502" y="106" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-111-147-26-0)" font-size="12px"><text x="507.5" y="123.5">Select Next / Previous</text></g><rect x="502" y="138" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-143-147-26-0)" font-size="12px"><text x="507.5" y="155.5">Select Child / Parent</text></g><rect x="502" y="170" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-175-147-26-0)" font-size="12px"><text x="507.5" y="187.5">Add to Selection</text></g><rect x="502" y="202" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-207-147-26-0)" font-size="12px"><text x="507.5" y="219.5">Remove from Selection</text></g><rect x="502" y="234.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="252">Select All / None</text></g><rect x="502" y="267" width="146" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-272-138-26-0)" font-size="12px"><text x="507.5" y="284.5">Select Vertices / Edges</text></g><rect x="502" y="299" width="145" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-304-137-26-0)" font-size="12px"><text x="507.5" y="316.5">Toggle Selection State</text></g><rect x="502" y="331" width="136" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-336-128-26-0)" font-size="12px"><text x="507.5" y="348.5">Select Cell Below</text></g><rect x="374" y="426" 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-431-158-26-0)" font-size="12px"><text x="379.5" y="443.5">Alt+Mouse wheel</text></g><rect x="374" y="490" 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-495-122-26-0)" font-size="12px"><text x="379.5" y="507.5">Ctrl+Mouse wheel</text></g><rect x="374" y="522.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-527-122-26-0)" font-size="12px"><text x="379.5" y="540">Mouse wheel</text></g><rect x="374" y="555" 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-560-122-26-0)" font-size="12px"><text x="379.5" y="572.5">Shift+Mouse wheel</text></g><rect x="374" y="587" 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-592-152-26-0)" font-size="12px"><text x="379.5" y="604.5">Space / Right mouse Drag</text></g><rect x="374" y="619" 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-624-122-26-0)" font-size="12px"><text x="379.5" y="636.5">Ctrl+Shift+Drag</text></g><rect x="374" y="651.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-657-122-26-0)" font-size="12px"><text x="379.5" y="669">Ctrl+Shift+Connect</text></g><rect x="374" y="684" 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-689-122-26-0)" font-size="12px"><text x="379.5" y="701.5">Shift+Home</text></g><rect x="374" y="716" 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-721-122-26-0)" font-size="12px"><text x="379.5" y="733.5">End</text></g><rect x="374" y="748" 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-753-122-26-0)" font-size="12px"><text x="379.5" y="765.5">Home</text></g><rect x="374" y="780.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-786-122-26-0)" font-size="12px"><text x="379.5" y="798">Ctrl+Shift+H</text></g><rect x="374" y="813" 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-818-122-26-0)" font-size="12px"><text x="379.5" y="830.5">Ctrl+J</text></g><rect x="374" y="845" 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-850-122-26-0)" font-size="12px"><text x="379.5" y="862.5">Ctrl+Shift+J</text></g><rect x="374" y="909.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-915-122-26-0)" font-size="12px"><text x="379.5" y="927">Ctrl + (Numpad)</text></g><rect x="374" y="942" 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-947-122-26-0)" font-size="12px"><text x="379.5" y="959.5">Ctrl - (Numpad)</text></g><rect x="374" y="877" 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-882-122-26-0)" font-size="12px"><text x="379.5" y="894.5">Ctrl+0</text></g><rect x="544" y="426" width="125" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-431-117-26-0)" font-size="12px"><text x="549.5" y="443.5">Canvas Zoom In/Out</text></g><rect x="544" y="490" width="152" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-495-144-26-0)" font-size="12px"><text x="549.5" y="507.5">Screen Zoom In/Out (Mac)</text></g><rect x="544" y="522.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-528-142-26-0)" font-size="12px"><text x="549.5" y="540">Canvas Vertical Scroll</text></g><rect x="544" y="555" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-560-142-26-0)" font-size="12px"><text x="549.5" y="572.5">Canvas Horizontal Scroll</text></g><rect x="544" y="587" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-592-122-26-0)" font-size="12px"><text x="549.5" y="604.5">Pan Canvas</text></g><rect x="544" y="619" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-624-142-26-0)" font-size="12px"><text x="549.5" y="636.5">Create / Remove Space</text></g><rect x="544" y="651.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-657-142-26-0)" font-size="12px"><text x="549.5" y="669">Disable Connections</text></g><rect x="544" y="684" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-689-142-26-0)" font-size="12px"><text x="549.5" y="701.5">Home</text></g><rect x="544" y="716" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-721-142-26-0)" font-size="12px"><text x="549.5" y="733.5">Refresh</text></g><rect x="544" y="748" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-753-142-26-0)" font-size="12px"><text x="549.5" y="765.5">Reset View</text></g><rect x="544" y="780.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-786-142-26-0)" font-size="12px"><text x="549.5" y="798">Fit Window</text></g><rect x="544" y="813" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-818-142-26-0)" font-size="12px"><text x="549.5" y="830.5">Fit Page</text></g><rect x="544" y="845" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-850-142-26-0)" font-size="12px"><text x="549.5" y="862.5">Fit Two Pages</text></g><rect x="544" y="877" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-882-142-26-0)" font-size="12px"><text x="549.5" y="894.5">Custom Zoom</text></g><rect x="544" y="909.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-915-142-26-0)" font-size="12px"><text x="549.5" y="927">Zoom In</text></g><rect x="544" y="942" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-947-142-26-0)" font-size="12px"><text x="549.5" y="959.5">Zoom Out</text></g><rect x="405" y="1006" 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="406.5" y="1020.5">Click to connect and clone (ctrl+click to clone,</text><text x="406.5" y="1034.5">shift+click to connect). Drag to connect</text><text x="406.5" y="1048.5">(ctrl+drag to clone).</text></g><image x="381.99" y="1101.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg=="/><rect x="405" y="1067" width="239" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1067-239-20-0)" font-size="12px"><text x="406.5" y="1081.5">Click to rotate 90° clockwise. Drag to rotate.</text></g><rect x="405" y="1104" width="258" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1104-258-20-0)" font-size="12px"><text x="406.5" y="1118.5">Ctrl: Show Dialog, Alt: Origin, Shift: Ignore XML</text></g><rect x="741" y="106" 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-111-92-26-0)" font-size="12px"><text x="746.5" y="123.5">Ctrl+Shift+L</text></g><rect x="741" y="138" 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-143-92-26-0)" font-size="12px"><text x="746.5" y="155.5">Ctrl+Shift+O</text></g><rect x="741" y="170" 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-175-72-26-0)" font-size="12px"><text x="746.5" y="187.5">Ctrl+M</text></g><rect x="741" y="202" 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-207-92-26-0)" font-size="12px"><text x="746.5" y="219.5">Ctrl+Shift+P</text></g><rect x="741" y="234.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="252">Ctrl+Shift+M</text></g><rect x="741" y="267" 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-272-72-26-0)" font-size="12px"><text x="746.5" y="284.5">Rightclick</text></g><rect x="741" y="331" 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-336-72-26-0)" font-size="12px"><text x="746.5" y="348.5">F1</text></g><rect x="830" y="106" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-111-162-26-0)" font-size="12px"><text x="835.5" y="123.5">Toggle Layers Window</text></g><rect x="830" y="138" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-143-162-26-0)" font-size="12px"><text x="835.5" y="155.5">Toggle Outline Window</text></g><rect x="830" y="170" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-175-162-26-0)" font-size="12px"><text x="835.5" y="187.5">Edit Metadata</text></g><rect x="830" y="202" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-207-162-26-0)" font-size="12px"><text x="835.5" y="219.5">Toggle Format Panel</text></g><rect x="830" y="234.5" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-240-162-26-0)" font-size="12px"><text x="835.5" y="252">Edit Vertex Geometry</text></g><rect x="830" y="267" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-272-152-26-0)" font-size="12px"><text x="835.5" y="284.5">Context Menu</text></g><rect x="830" y="331" width="93" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-336-85-26-0)" font-size="12px"><text x="835.5" y="348.5">About</text></g><rect x="741" y="426" 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-431-222-26-0)" font-size="12px"><text x="746.5" y="443.5">Alt+(Shift+)Drag from sidebar</text></g><rect x="741" y="458" 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-463-232-26-0)" font-size="12px"><text x="746.5" y="475.5">Alt+(Shift / Ctrl)+Click on a sidebar item</text></g><rect x="741" y="490" 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-495-222-26-0)" font-size="12px"><text x="746.5" y="507.5">Shift+Click on a sidebar item</text></g><rect x="741" y="522.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-528-222-26-0)" font-size="12px"><text x="746.5" y="540">Click on a sidebar item</text></g><rect x="741" y="555" 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-560-222-26-0)" font-size="12px"><text x="746.5" y="572.5">Shift+Connect</text></g><rect x="1001" y="426" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-431-408-26-0)" font-size="12px"><text x="1006.5" y="443.5">Disable replace, connect on drop (drop targets), Shift ignores current style</text></g><rect x="1001" y="458" width="416" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-463-408-26-0)" font-size="12px"><text x="1006.5" y="475.5">Inserts and connects the selected item (Shift ignores current style)</text></g><rect x="1001" y="490" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-495-262-26-0)" font-size="12px"><text x="1006.5" y="507.5">Replaces the selected item with the clicked one</text></g><rect x="1001" y="522.5" width="270" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-527-262-26-0)" font-size="12px"><text x="1006.5" y="540">Connects unconnected side of selected edge</text></g><rect x="1001" y="555" width="306" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1005-560-298-26-0)" font-size="12px"><text x="1006.5" y="572.5">Connect to shape outline (ignore connection points)</text></g><rect x="741" y="651.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="669">Ctrl+S</text></g><rect x="741" y="684" 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-689-82-26-0)" font-size="12px"><text x="746.5" y="701.5">Ctrl+Shift+S</text></g><rect x="741" y="716" 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-721-82-26-0)" font-size="12px"><text x="746.5" y="733.5">Ctrl+Z</text></g><rect x="741" y="748" 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-753-82-26-0)" font-size="12px"><text x="746.5" y="765.5">Alt+Shift+A</text></g><rect x="741" y="812.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-818-82-27-0)" font-size="12px"><text x="746.5" y="830">Hold Alt</text></g><rect x="741" y="845" 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-850-82-26-0)" font-size="12px"><text x="746.5" y="862.5">Ctrl+Shift+G</text></g><rect x="741" y="877" 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-882-82-26-0)" font-size="12px"><text x="746.5" y="894.5">Ctrl+P</text></g><rect x="741" y="909.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-915-82-26-0)" font-size="12px"><text x="746.5" y="927">Ctrl+Y</text></g><rect x="741" y="942" 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-947-82-26-0)" font-size="12px"><text x="746.5" y="959.5">Ctrl+Shift+Z</text></g><rect x="741" y="974" 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-979-82-26-0)" font-size="12px"><text x="746.5" y="991.5">Ctrl+Shift+X</text></g><rect x="741" y="1006.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-1011-82-26-0)" font-size="12px"><text x="746.5" y="1024">Ctrl+K</text></g><rect x="741" y="1039" 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-1044-82-26-0)" font-size="12px"><text x="746.5" y="1056.5">Ctrl+Shift+K</text></g><rect x="741" y="1071" 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-1076-82-26-0)" font-size="12px"><text x="746.5" y="1088.5">Esc</text></g><rect x="741" y="1103" 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-1108-98-26-0)" font-size="12px"><text x="746.5" y="1120.5">Alt+Drag / Drop</text></g><rect x="841" y="684" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-689-132-26-0)" font-size="12px"><text x="846.5" y="701.5">Save as</text></g><rect x="841" y="651.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-657-132-26-0)" font-size="12px"><text x="846.5" y="669">Save</text></g><rect x="841" y="716" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-721-132-26-0)" font-size="12px"><text x="846.5" y="733.5">Undo</text></g><rect x="841" y="748" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-753-132-26-0)" font-size="12px"><text x="846.5" y="765.5">Connection Arrows</text></g><rect x="841" y="812" width="203" height="28" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-817-195-28-0)" font-size="12px"><text x="846.5" y="829.5">Ignores handles under the mouse</text></g><rect x="841" y="845" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-850-132-26-0)" font-size="12px"><text x="846.5" y="862.5">Toggle grid</text></g><rect x="841" y="877" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-882-132-26-0)" font-size="12px"><text x="846.5" y="894.5">Print</text></g><rect x="841" y="909.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-915-132-26-0)" font-size="12px"><text x="846.5" y="927">Redo (Windows)</text></g><rect x="841" y="942" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-947-132-26-0)" font-size="12px"><text x="846.5" y="959.5">Redo (Linux/Mac)</text></g><rect x="841" y="974" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-979-132-26-0)" font-size="12px"><text x="846.5" y="991.5">Insert Text</text></g><rect x="841" y="1006.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1012-132-26-0)" font-size="12px"><text x="846.5" y="1024">Insert Rectangle</text></g><rect x="841" y="1039" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1044-132-26-0)" font-size="12px"><text x="846.5" y="1056.5">Insert Ellipse</text></g><rect x="841" y="1071" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1076-132-26-0)" font-size="12px"><text x="846.5" y="1088.5">Cancel Action</text></g><rect x="841" y="1103" width="216" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1108-208-26-0)" font-size="12px"><text x="846.5" y="1120.5">Force Rubberband / Ignore Group</text></g><rect x="1101" y="887" 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-892-102-26-0)" font-size="12px"><text x="1106.5" y="904.5">Drag</text></g><rect x="1101" y="919.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-925-102-26-0)" font-size="12px"><text x="1106.5" y="937">Tap and hold</text></g><rect x="1101" y="952" 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-957-102-26-0)" font-size="12px"><text x="1106.5" y="969.5">Pinch</text></g><rect x="1101" y="984" 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-989-102-26-0)" font-size="12px"><text x="1106.5" y="1001.5">Tap selected cell</text></g><rect x="1211" y="887" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-892-132-26-0)" font-size="12px"><text x="1216.5" y="904.5">Move Cell / Pan Canvas</text></g><rect x="1211" y="920" width="196" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-925-188-26-0)" font-size="12px"><text x="1216.5" y="937.5">Toggle Selection / Rubberband</text></g><rect x="1211" y="952" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-957-112-26-0)" font-size="12px"><text x="1216.5" y="969.5">Zoom</text></g><rect x="1211" y="984" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-989-112-26-0)" font-size="12px"><text x="1216.5" y="1001.5">Context Menu</text></g><rect x="1101" y="106" 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-111-112-26-0)" font-size="12px"><text x="1106.5" y="123.5">Cursor</text></g><rect x="1101" y="138" 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-143-112-26-0)" font-size="12px"><text x="1106.5" y="155.5">Shift+Cursor</text></g><rect x="1101" y="170" 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-175-112-26-0)" font-size="12px"><text x="1106.5" y="187.5">Ctrl+Cursor</text></g><rect x="1101" y="202" 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-207-112-26-0)" font-size="12px"><text x="1106.5" y="219.5">Ctrl+Shift+Cursor</text></g><rect x="1101" y="234.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-240-112-26-0)" font-size="12px"><text x="1106.5" y="252">Alt+Shift+Cursor</text></g><rect x="1101" y="267" 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-272-112-26-0)" font-size="12px"><text x="1106.5" y="284.5">Alt+Cursor</text></g><rect x="1101" y="299" 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-304-112-26-0)" font-size="12px"><text x="1106.5" y="316.5">Ctrl+Shift+Pg Up</text></g><rect x="1101" y="331" 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-336-132-26-0)" font-size="12px"><text x="1106.5" y="348.5">Ctrl+Shift+Pg Down</text></g><rect x="1241" y="106" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-111-141-26-0)" font-size="12px"><text x="1246.5" y="123.5">Scroll / Move cell (pt)</text></g><rect x="1241" y="138" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-143-141-26-0)" font-size="12px"><text x="1246.5" y="155.5">Move cell (grid size)</text></g><rect x="1241" y="170" width="181" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-175-173-26-0)" font-size="12px"><text x="1246.5" y="187.5">Resize cell (pt, +Option on Mac)</text></g><rect x="1241" y="202" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-207-168-26-0)" font-size="12px"><text x="1246.5" y="219.5">Resize cell (grid size)</text></g><rect x="1241" y="234.5" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-240-141-26-0)" font-size="12px"><text x="1246.5" y="252">Clone and connect</text></g><rect x="1241" y="267" width="149" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-272-141-26-0)" font-size="12px"><text x="1246.5" y="284.5">Scroll Page</text></g><rect x="1241" y="299" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-304-122-26-0)" font-size="12px"><text x="1246.5" y="316.5">Previous Page</text></g><rect x="1241" y="331" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1245-336-132-26-0)" font-size="12px"><text x="1246.5" y="348.5">Next Page</text></g><rect x="1101" y="651" 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-656-92-26-0)" font-size="12px"><text x="1106.5" y="668.5">Ctrl+Shift+R</text></g><rect x="1101" y="684" 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-689-92-26-0)" font-size="12px"><text x="1106.5" y="701.5">Ctrl+E</text></g><rect x="1101" y="716" 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-721-92-26-0)" font-size="12px"><text x="1106.5" y="733.5">Ctrl+Shift+D</text></g><rect x="1101" y="748" 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-753-92-26-0)" font-size="12px"><text x="1106.5" y="765.5">Ctrl+Shift+C</text></g><rect x="1101" y="780.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-786-92-26-0)" font-size="12px"><text x="1106.5" y="798">Ctrl+Shift+V</text></g><rect x="1211" y="651" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-656-112-26-0)" font-size="12px"><text x="1216.5" y="668.5">Clear Default Style</text></g><rect x="1211" y="684" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-689-112-26-0)" font-size="12px"><text x="1216.5" y="701.5">Edit Style</text></g><rect x="1211" y="716" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-721-112-26-0)" font-size="12px"><text x="1216.5" y="733.5">Set as Default Style</text></g><rect x="1211" y="748" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-753-112-26-0)" font-size="12px"><text x="1216.5" y="765.5">Copy Style</text></g><rect x="1211" y="780.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-786-112-26-0)" font-size="12px"><text x="1216.5" y="798">Paste Style</text></g><rect x="1080" y="70" 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-75-165-26-0)" font-size="14px"><text x="1085.5" y="89.5">CURSOR / PAGE KEYS</text></g><rect x="721" y="70" 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-75-165-26-0)" font-size="14px"><text x="726.5" y="89.5">TOOLS</text></g><rect x="365" y="70" 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-75-165-26-0)" font-size="14px"><text x="370.5" y="89.5">SELECTION</text></g><rect x="1" y="70" 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-75-165-26-0)" font-size="14px"><text x="6.5" y="89.5">LABELS</text></g><rect x="0" y="391" 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-396-165-26-0)" font-size="14px"><text x="5.5" y="410.5">CANVAS</text></g><rect x="361" y="391" 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-396-165-26-0)" font-size="14px"><text x="366.5" y="410.5">VIEW</text></g><rect x="721" y="391" 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-396-165-26-0)" font-size="14px"><text x="726.5" y="410.5">SIDEBAR / CONNECT</text></g><rect x="1081" y="615" 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-620-165-26-0)" font-size="14px"><text x="1086.5" y="634.5">STYLES</text></g><rect x="721" y="615" 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-620-165-26-0)" font-size="14px"><text x="726.5" y="634.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-0-273-52-0)" font-size="27px"><text x="192.5" y="37.25">Keyboard Shortcuts</text></g><rect x="161" y="1103" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1108-142-26-0)" font-size="12px"><text x="166.5" y="1120.5">Connect to a Fixed Point</text></g><rect x="21" y="1103" 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-1108-132-26-0)" font-size="12px"><text x="26.5" y="1120.5">Alt+Connect</text></g><rect x="741" y="299" 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-304-72-26-0)" font-size="12px"><text x="746.5" y="316.5">Ctrl+Click</text></g><rect x="830" y="299" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-304-152-26-0)" font-size="12px"><text x="835.5" y="316.5">Context Menu</text></g><a xlink:href="https://www.draw.io/?url=https%3A%2F%2Fwww.draw.io%2Fshortcuts.svg"><rect x="1111.67" y="1110" width="114" 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="1123.5">Open in draw.io...</text></g></a><rect x="374" y="458" 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-463-142-26-0)" font-size="12px"><text x="379.5" y="475.5">Ctrl+Shift+Mouse wheel</text></g><rect x="544" y="458" width="123" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-463-115-26-0)" font-size="12px"><text x="549.5" y="475.5">Canvas Zoom In/Out</text></g><rect x="841" y="780.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-786-132-26-0)" font-size="12px"><text x="846.5" y="798">Connection Points</text></g><rect x="741" y="780.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-785-82-26-0)" font-size="12px"><text x="746.5" y="798">Alt+Shift+P</text></g><rect x="116" y="106" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-111-192-26-0)" font-size="12px"><text x="121.5" y="123.5">Insert text or add an edge label</text></g><rect x="21" y="106" 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-111-112-26-0)" font-size="12px"><text x="26.5" y="123.5">Double click</text></g><rect x="130.28" y="779" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-130-780-10-20-0)" font-size="10px"><text x="131.78" y="790.5">2</text></g><rect x="1112" y="1076" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1088">Ctrl+Resize for non-recursive group resize</text><text x="1113.5" y="1102">Ctrl+Meta+Resize for centered group resize</text></g><rect x="1105.33" y="1068" 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="1079.5">2</text></g><rect x="91" y="139" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-91-140-10-20-0)" font-size="10px"><text x="92.5" y="150.5">1</text></g><rect x="1112" y="1037" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1049">Ctrl / Shift+Enter: New Line / Apply in Safari</text><text x="1113.5" y="1063">Ctrl / Shift+Esc: Cancel Editing</text></g><rect x="1105.33" y="1029" 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="1040.5">1</text></g><rect x="21" y="426" 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-431-132-26-0)" font-size="12px"><text x="26.5" y="443.5">Ctrl+X</text></g><rect x="21" y="458" 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-463-132-26-0)" font-size="12px"><text x="26.5" y="475.5">Ctrl+C</text></g><rect x="21" y="490" 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-495-132-26-0)" font-size="12px"><text x="26.5" y="507.5">Ctrl+V</text></g><rect x="21" y="522.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-528-132-26-0)" font-size="12px"><text x="26.5" y="540">Ctrl+G</text></g><rect x="21" y="555" 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-560-132-26-0)" font-size="12px"><text x="26.5" y="572.5">Ctrl+Shift+U</text></g><rect x="21" y="587" 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-592-132-26-0)" font-size="12px"><text x="26.5" y="604.5">Ctrl+L / Alt+Shift+L</text></g><rect x="21" y="619" 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-624-132-26-0)" font-size="12px"><text x="26.5" y="636.5">Ctrl+Enter / D</text></g><rect x="21" y="651.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-657-132-26-0)" font-size="12px"><text x="26.5" y="669">Backspace or Delete</text></g><rect x="21" y="684" 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-689-132-26-0)" font-size="12px"><text x="26.5" y="701.5">Ctrl+Delete</text></g><rect x="21" y="716" 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-721-132-26-0)" font-size="12px"><text x="26.5" y="733.5">Ctrl+R</text></g><rect x="21" y="748" 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-753-132-26-0)" font-size="12px"><text x="26.5" y="765.5">Shift+Resize</text></g><rect x="21" y="780.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-786-132-26-0)" font-size="12px"><text x="26.5" y="798">Ctrl / Meta+Resize</text></g><rect x="21" y="813" 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-818-132-26-0)" font-size="12px"><text x="26.5" y="830.5">Ctrl+Home</text></g><rect x="21" y="845" 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-850-132-26-0)" font-size="12px"><text x="26.5" y="862.5">Ctrl+End</text></g><rect x="21" y="877" 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-882-132-26-0)" font-size="12px"><text x="26.5" y="894.5">Ctrl+Shift+Home</text></g><rect x="21" y="909.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-915-132-26-0)" font-size="12px"><text x="26.5" y="927">Ctrl+Shift+End</text></g><rect x="21" y="942" 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-947-132-26-0)" font-size="12px"><text x="26.5" y="959.5">Ctrl+Shift+B</text></g><rect x="21" y="974" 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-979-132-26-0)" font-size="12px"><text x="26.5" y="991.5">Ctrl+Shift+F</text></g><rect x="21" y="1006.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-1012-132-26-0)" font-size="12px"><text x="26.5" y="1024">Alt+Shift+C/T</text></g><rect x="21" y="1039" 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-1044-132-26-0)" font-size="12px"><text x="26.5" y="1056.5">Ctrl+Shift+Y</text></g><rect x="21" y="1071" 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-1076-132-26-0)" font-size="12px"><text x="26.5" y="1088.5">Ctrl / Shift+Drag</text></g><rect x="161" y="426" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-431-142-26-0)" font-size="12px"><text x="166.5" y="443.5">Cut</text></g><rect x="161" y="458" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-463-142-26-0)" font-size="12px"><text x="166.5" y="475.5">Copy</text></g><rect x="161" y="490" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-495-142-26-0)" font-size="12px"><text x="166.5" y="507.5">Paste</text></g><rect x="161" y="522.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-528-142-26-0)" font-size="12px"><text x="166.5" y="540">Group</text></g><rect x="161" y="555" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-560-142-26-0)" font-size="12px"><text x="166.5" y="572.5">Ungroup</text></g><rect x="161" y="587" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-592-142-26-0)" font-size="12px"><text x="166.5" y="604.5">Lock/Unlock / Edit Link</text></g><rect x="161" y="619" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-624-142-26-0)" font-size="12px"><text x="166.5" y="636.5">Duplicate</text></g><rect x="161" y="651.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-657-142-26-0)" font-size="12px"><text x="166.5" y="669">Delete Selected Cells</text></g><rect x="161" y="684" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-689-142-26-0)" font-size="12px"><text x="166.5" y="701.5">Delete with Connections</text></g><rect x="161" y="716" width="159" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-721-151-26-0)" font-size="12px"><text x="166.5" y="733.5">Turn / Rotate 90° Clockwise</text></g><rect x="161" y="748" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-753-142-26-0)" font-size="12px"><text x="166.5" y="765.5">Maintain Proportions</text></g><rect x="161" y="942" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-947-142-26-0)" font-size="12px"><text x="166.5" y="959.5">Send to Back</text></g><rect x="161" y="813" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-818-142-26-0)" font-size="12px"><text x="166.5" y="830.5">Collapse Container</text></g><rect x="161" y="845" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-850-142-26-0)" font-size="12px"><text x="166.5" y="862.5">Expand Container</text></g><rect x="161" y="877" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-882-142-26-0)" font-size="12px"><text x="166.5" y="894.5">Exit Group</text></g><rect x="161" y="909.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-915-142-26-0)" font-size="12px"><text x="166.5" y="927">Enter Group</text></g><rect x="161" y="974" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-979-142-26-0)" font-size="12px"><text x="166.5" y="991.5">Bring to Front</text></g><rect x="161" y="780.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-786-142-26-0)" font-size="12px"><text x="166.5" y="798">Centered / Group Resize</text></g><rect x="161" y="1007" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1012-168-26-0)" font-size="12px"><text x="166.5" y="1024.5">Clear Waypoints / Edit Tooltip</text></g><rect x="161" y="1039" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1044-142-26-0)" font-size="12px"><text x="166.5" y="1056.5">Autosize</text></g><rect x="161" y="1071" width="156" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1076-148-26-0)" font-size="12px"><text x="166.5" y="1088.5">Clone cell/Disconnect edge</text></g><rect x="481" y="12.25" width="456" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#777777" font-family="Helvetica" clip-path="url(#mx-clip-485-17-448-26-0)" font-size="18px"><text x="486.5" y="35.75">cmd instead of ctrl, option instead of alt for macOS </text></g><rect x="1087" y="811" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1087" y="843" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="1101" y="813" 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-818-92-26-0)" font-size="12px"><text x="1106.5" y="830.5">Alt+Shift+X</text></g><rect x="1101" y="845.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-851-92-26-0)" font-size="12px"><text x="1106.5" y="863">Alt+Shift+V</text></g><rect x="1211" y="813" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-818-112-26-0)" font-size="12px"><text x="1216.5" y="830.5">Copy Size</text></g><rect x="1211" y="845.5" width="120" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-1215-851-112-26-0)" font-size="12px"><text x="1216.5" y="863">Paste Size</text></g><image x="376.49" y="1011.5" width="26" height="18" xlink:href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjZweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNiAxOCI+PHBhdGggZD0ibSAxIDYgTCAxNCA2IEwgMTQgMSBMIDI2IDkgTCAxNCAxOCBMIDE0IDEyIEwgMSAxMiB6IiBzdHJva2U9IiNmZmYiIGZpbGw9IiMyOWI2ZjIiLz48L3N2Zz4=" preserveAspectRatio="none"/><path d="M 42 44.62 C 42 45.18 41.4 45.69 40.97 45.69 L 7.93 45.69 C 7.47 45.69 7 45.18 7 44.76 L 7 11.9 C 7 11.28 7.33 10.75 8.02 10.75 L 41.17 10.78 C 41.67 10.78 41.99 11.23 42 11.82 Z" fill="#f08707" stroke="none" pointer-events="all"/><path d="M 19.94 45.69 L 14.54 37.6 L 27.06 18.97 L 28.5 18.71 L 42 32.48 L 42 44.66 C 42 45.1 41.44 45.75 41 45.69 Z" fill="#db6112" stroke="none" pointer-events="all"/><path d="M 15.13 37.69 C 14.28 37.69 13.88 36.99 13.88 36.42 L 13.88 31.83 C 13.88 31.28 14.3 30.6 14.89 30.6 L 18.5 30.6 L 21.72 25.27 L 21.29 25.27 C 21.04 25.27 20.27 24.77 20.27 24.24 L 20.27 19.34 C 20.27 18.79 20.96 18.09 21.48 18.09 L 27.31 18.09 C 27.84 18.09 28.7 18.39 28.7 19.39 L 28.7 24.1 C 28.7 24.65 28.21 25.27 27.7 25.27 L 27.28 25.27 L 30.51 30.6 L 33.95 30.6 C 34.76 30.6 35.16 31.05 35.16 31.71 L 35.16 36.42 C 35.16 37.14 34.54 37.69 33.93 37.69 L 28.14 37.69 C 27.4 37.69 26.76 37.21 26.76 36.48 L 26.76 31.53 C 26.84 31.03 27.31 30.6 27.87 30.6 L 28.96 30.6 L 25.86 25.27 L 23.19 25.27 L 20.1 30.6 L 21.29 30.6 C 21.81 30.6 22.26 31.1 22.26 31.69 L 22.26 36.71 C 22.26 37.12 21.78 37.69 21.23 37.69 Z" fill="#ffffff" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><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: 28px; margin-left: 48px;"><div style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: #1A5BA3; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: nowrap; "><font style="font-size: 20px">diagrams.<font color="#f08707" style="font-size: 20px">net</font></font></div></div></div></foreignObject><text x="48" y="33" 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://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</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="1133px" viewBox="-0.5 -0.5 1428 1133" content="&lt;mxfile modified=&quot;2020-08-19T11:00:35.638Z&quot; host=&quot;test.draw.io&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36&quot; etag=&quot;cVJp50VoHpDG9lL3-5pj&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;7Z3ZduK6EoafJmv1vugsz8MlY0I3QxJI0p07YzvGCWCOMWF4+iN5AiwRsk+jch9QVg/BGNtUfZZVv6SqK7k2Wd2E1mzUCRx3fCUJzupKrl9JkqhoAvoPb1mnWyTVTLZ4oe8k24Tthr6/cdMds60L33Hn6bZkUxQE48if7W+0g+nUtaO9bVYYBsv93V6DsbO3YWZ57t5l4A192xq7xG7PvhON0q2aqmzfuHV9b5SdWtTSLzi07HcvDBbT9IRXktyIf5K3J1Z2sPTE85HlBMudTXLjSq6FQRAlv01WNXeMrbtvt+aBd/MLD91p9JUPaM9Dtfu0cRf1yO6/G53v67r8XVbSq/uwxgs3+yLx5UbrzEboymf4V38SG7P64YaRj0zYtobu+C6Y+5EfTNH7wyCKggnaYYzfqOb2qQXjIIwPJb/GPzvHqIx9D382CmZoqzWfJU5+9Vcuuu5qfMpKtlXItqDfHSuyruRK8lJqzj+8K6m6mqBvXLu77Uov66oyfF4t7I3gW7cPgl0PPtqyIztrVe6s1Q97Yn903irLTs3cOBPbb92OouGNuulNR3PrWQ3v+j8C5/Zh2fOND/QpuT21N+2JuX5ZG6ve4F1ty8l+Lb8qW88PglUX/M7gZenWWp518zR7kUbCXb+16k6rCtpHsp6f5PuJqaBty1a94nXe7vFfdN6XsT3tzoaSYrbeGotOv4W+x91tdeTceJ4tP6yHUjRGn3rrvI397uT3Gh1tYj2v5oVt7+iKu53B46I7ePS6fUXsPi5XnX5l5bx1Fp26U++ulWXXrwjtt0epVb/30Gu1g1636o21vcH7POJtQrdWkVt1e9EbdKX2oIW2/3jD//fq91H77V5pDx6jjq+o3Zogot/Rfs0Ner3q+uj12/2mVX+M0PnVztPvVedmic+H9rtfdOtP2mDQUNtv72ifxur3Wlh0BnbU6SubXl9YdDctfFzkHWHVfvu9bg866JzjeXvQQJ9teWg/oTPpoO+HjrVB5617eBv6Lshq+H0fXbvkrdtvlbX7Lqw668oKf0fnLfkO2XnQOfG+Mrp+dJyG10H7xOd4a6bnusfXJHRvOuj72ug7PQrx9sE7Oud7FJ/Hr6BrrGzcibBpv3kqtk+3/mMeX2P83j36fslxO4Pf8bV3+wK6tsf4mjt+8jmrJsTXm9jiHh3fjm2Mv1Nsj76yRMdb422u3/q4e1t+2PLL9M7DtxP+UyWbgbRlwHeYu9rZlDYLN24wcaNwjXZJ31V04VrVze1PcoCsSRcMNdmw3DaQknJtyMnW0U7ruLPZShtmLz/dtm1Cv6TNE72pko+3SXHDgpuIuFFYjvzI7c8sG7+7RI8qtG0UocZArovo11d/PN5phJrxD9o+j8Lg3c3emQZT3Lq9BtNoZ+fk5zSGFgVhz7SKIhOWzVvkXbvKwp8bVbkUo+okrsyMql6IUVXZuDZNook4amLxz02sXYqJBR2OW/1SjKpLcEY1LsSomqDAGdW8FKNqBlybKn4h6jsPq8oaHKqieCFW1QUR0KrSpVhVBowGxEuJsXQNMBwQLyXI0s2vdlZP8bS6lCjLyBgEYfVSAitDA4wBxEuJrAwTMAgQLyW0MiW1LJ1FvJRISxQlwGZWupRQSxSMr0awpzDrpcRaoqAChrCZFS/ArNJXo60TtK0XM6JlmoDKwMUMaZnqV/sBp7DquUZb+WSlMkZfz3YYq2jVEkcKz3ZUi7Ax5KjW2Q5rFa0KOqx1tuNahFUhx7Xkcw22CKtCjmvJ5xprEe0q5BQM+VxDLaKfBTkhSz7XSKtoVdAxWPlcIy3CqpBjsPKlRFqgY7DypURaoGOw8qXEVqBjsPKlxFagY7DypcRWoGOwX1kpdhZWNaWvxlYnaFeVS4mtQDVs5VJiK/HLo1insOqlxFaiCthfVS4lthINQHVFuZTYKp+3A2LVS4mtJFXYH8X6akfrFF2CSwm1ZBFQxFYuJdSSDMig4FJCLVkBnNymnmuoRczCguy+qucaahFWhey+qucaahFWhey+qucaahWtCtp9Vc811CKsWmL3VT3XyIswMmRHSz3XyKtoVdCgQD3XUIuwKmj39VxDLUMqs/t6rqEWYVXI7qt2rqEWYVXI7qt2rqFW0aqg3ddsDP38rVrsvn7RxifovWrnGngRNobsvWrnGngVrQrae9XONdIirArZe9XONtISjTLNerahFmFW0DbgXGMtwqywD6xzDbZIs6ritbDz89VVBSfoa+nnGnuRRoYME/RzDb4Is4LGtNma2wswK6QAo59rwEWaFVIt1C8l4qJlcdAFVla9lIiLtmaTnVXPNeIqWpW2vpidVc814CKsKpt7PVjpizY+RQ/2XKMvwsaUjCPsyD3X4KtoVU0zyoq9jHONvYo2Bl0nb5xr6EVYFXJFt3GukRdhVcjsA8a5Bl6EVU19r5UFzPtoXEoUBrpq3riUKAx01bxxKVEY6Kp541KisBIzlxuXEoWBrqE3LiUKg00FbV5K4AWaCtq8lMALNh28eSmRF2zxAvNSQi/YUhvmuUZbxFBiicKhea7BF2FkUOXQPNfoizQrpMhlnmv4RZoVUpE1zzXiIs1aEA8hW9pzDcAII5uQmffzpZEXYNcvZ4k/Aa6icK4xGGlXDVCHEbMJDedvV/Hr7etJDEuGYf2R/xpdSdXGNHJDwsroe6HzV62x703RlrH7il/iL+zb1riSbo4CbO85Mr8/9drxPnVlu+Uh/RZ4U4A++zoOlujlyHccF328GgaRFVnD+JzYmbPAn0bx11Sr6A/64jXhWr1S0QXV0Gtx+xr9wbuHyF9T5EvLjz3jWvNo6c6jT3yJt/fTrymexLHKvl9V7Vg6ChQo7j1nM9/sOj3Ly/pnTieDxE+dTb8pdu6gdBOH4t9CYexP2xLJuXFwUJBBbRO/xkeQBM5HGXxI0tEcNnB8kNH5Dh8Da7hlZW5zUqBJUeVrMvgVFSg4SI2hFoVol2o1x6LFoYCGwtgfjzZI1Qmu+SDlkpSQR84FMBeyqP89jxVS4Um5uM5bDmxZzggwI1kC1jKgEEl5SgQh4G9yrr+JfStsMRzga6x/V04kPWTDWHkXQiI9TtEdxJN4mBTKuu4SbWj7yFtoxyn6pxmEEyuKXAdvt4bueM6bgU+aAeEEUEhZe5zLFmRIKtEWvZzmvidlvoSKOyu0vNCajTgafw8aBqkAUxuM06BBESojK4xwvOn4EXJBRgL6P3hF//TdsWsnhCQH43yA8pEfAqbpIDXNPvbJLh7WFMNQmc3G+LKf4j05FcBUUIUKhlyQsuYg8Lwx7mRUgzECotmKkBdt3GxM95uNAWaBAwIMSFG0gISF1DhzWB6njhuOk94pB+UvAEUWQdEgFc7+YuaGczv0Z8j5zf5imP3O+fgr+KAoGHkSqtPzQeqb37KR9H/i0RHufqYClqIXxlYldV+sIucBmQU5S2TFBqlxVsYYDE5IqYRQtA2R2QNEIjXNzPv10PK496G9T5EvoBqE/OqLDQInokQiaIIFw/aA1DrTga/tU6HCGYBmgCpPgLULpMiZMpEh0brKZ9lwNqDZMMguJMP2gRQ0ExZS/2dE1Ma+/c5ZAGaBJj7ks6BOzwIpYib9Be78UpxPmxvBbORLIkXJRFpC27qxsJS2CHeh++EHCz4SylppUgszJ/L7c5eHLIH06XmgKJEZD7WRj4c0MiCSL8lxAMZB1Y8pTwzpIHXIioORiIJck/axPs2hgIWisNQDFgpSgHxwJ8jyaNtrGEw4GSWSQSzyAARDpoiS2bOkMt4GG13sWw4GMBiqfK0cmabNrNeZLYemkfEUu86db7UIx3N5txOcD5oeoWisgCD1ynxuxM7DQ+gjO/O2ApqFryzpUJg9RShzM/OIJNm36mIfcCqAqaAJFTKzFoJULBOVqhMs5riZWI5cl8/DZa5WZWUm8+pAyrH+pcYMCVK4TAc0OBNlMqEKFApkZn1JUsHk7i/V/Yq4F1lQxjLYwUCRL9OhLA5FqVDoypEaUgyhIFXLJHdTFmEm/pCESYoInyBTAiGacGxqvqgxI+TgOnE+Z6pMJGT9WOeSWaOhkOJlAQlkrWkchnIqYKnQBVo2GnYkUMTKFIFbdDjuf2D/65QCUwy9TyqTDbzSkzsd1uky6C1Pao78Vi/D69qx5NAMGTg0RTLvANxyHqB5MM1rtSweDqqNPzgHwBwY2XghjOdJhbHQEnACwAnQytOTlEP5KNEJcUbKb93FZGY5/3AogKEwJaM05Vk5lIJS+M6RKBEJDbSPcFBHFLjnoZ8Q5rF6qew4UCnioTX9sPCktpcgnhLbmqKj9BZcPmQ9bUWTizMWKEqCxGr2kkoRD+3Qdac0EoRvHcvmzwhoIqjzFbJ8pacnghQU87bhKfUV+hVREvC8gvAsKCJtcEFl9qSgLMrOaLgNQn+Dvi/noUQedMpcV3Y0kJrjnYUfFRkT3Pug3tdoC6nY9RopCmPoxhPes4kq2bqqdP4KxwEWB5miKLBrDEjZse7PY4uiBiGZfOAjC3EMoDGgT0BgBwKpN/LRyBL8Tp14wM7rpKD44L6G7nzEHQ/teNrkA3aOp62nnrvx2kjf5eucwL1/fBICMxY0Ukhs+piEZ3/q8DVv8CzgCQiQ/iflw8T/d5bHOwDQ3qdOO2Dne1IoTHw/WAYpAbzvD46ABqkHaRR1cDGP4mGDZPSAux/W/ccHFdnBQIqDOyNIHARQEL4w1YQdCKROmILAx5NLIIE2w4Sd7ylzEZM0nUkONjtblJTWo7LHcXIl4ZudzEOxtzvXpKtK9j46MTqwnNSDTCc12pTj/oPrpiZr4baHyE6ZHyE7mZPvmF4I/ngBzzBYTB0Xfz2RpI8O7U79Sukzx5Nwn8D9SnarZ6nXBEp+RimbDbbr/2zbn/mfVIUIk85H1gz/6k9wkICMOp9h/8j1V3+FLV1N36g76F68kivJS6k5w3XMav5TtfewFH7eeEEF/XT7j6PGo4d/NfA/LxWvg/6rDbrq6hVvqD1VO0+NX/EARfEP/kStZ3bu5njPyq+H/mDcqdz3hr9f8BGbDz8eGs1Ht6k+rd8aP7165f6he3P30K/IRqWq/Wg8zx/fPS8yR+2b+tAZj9TBTH9Q63ebaqXxU9F6LenRvh854c3LT+Tb5rQiylXzXh39Z9nw3xCA1vuTj7avm/XOj+Zb23gaPzpL5N+qd7saPqP/f8+9cXxp1R8Pj2ojfP/heR62Iv5zkKxTYKSr6PmxfYJk1bMzqvIs/nutCqVRUU8BFWXa2u7NH7fauBUxBXzL42Ya38/2+9Kfu/stQrYzeaOf9jk0QU8UfGTqU+arLQST5oCSN0vK1hfveU44gef0A6tU5coVTuKNFSKh7lvjwIvbeAGnzInf64W+h2ud1q6yZN/x5pY3DULs6V+d9qV6ME+Uv+tBldKgn8aDpMJTWFzA2hH/3126U0wdNbLkUnnKZeVovjNmqfl1UvYpANHjQEADoR4dAmDHw8GyHR3OATQHlLJOBlD5Fv3oetQ7zgMwD1/IrsyuXTi4HjXPeMV5gObhC0mV2QFBSkOxC2xexqUMFI5WmjaYgUDOF2uKHABgAGRVOLJCmR0ApEiYZ9NuW2s3xKsL+AwSkOECUyooe7RyPjozEkhlLyeht4jSivMchXJQKESVFN2JHRkGqRw2nHh6SceNrHhkgPMAzINhHJWd2PFA6pB5S9EMwomVzDqb8ty54Fx8IcpkhwWpRqbNxFPyfSThZve4nAtALnA54SNVv9iBQZEl0fdNSkZ23OmC4wCNw9GIk10CZYNSnWMY8NlI4BDQirKYMiuvH6ocvC0yn84MSOsAzn3HHVohp+ITKlhoEYqiHtEiJGarmg1SltyHJF3bjMXrf7ZVp4W43pe1C43gRy6f8gzOjq4d6X1KCjN2Dpfz4Jj8XZiown4JWkqWJYZtDCX5Hufj7+IDJ9bZ4YMyx4odHqQKyos4lIxDoR4QJA4mKX1uE2uE7mwc51bBMyO3s+njZsQJkR8l4Vv6f2SFnhvN/9mdRYlOE0+hxCMs9iKMLZaBxRljGwuJgkl0ewmsFJFVOUKTVFBb0zm6esxCuhoj4QlviEaYtnlcydR18qeS8O0oRzxBIDxI2ZA6DEik5vqQtEqfgbP00ZVlb8dzPuJ3eW31EngpdoYp8TYzYdakCrNZs7OYpm1QDAfuE2NGXveJch2eXKAEaAp1MykBFDtoKJNL875PvKwnWVSGWMlnDXzzs8Uidp6MDBsldgV/SMHzQ0lVKQvMHlKHp59y13/iehbBFE5Ip3wq0ZnMGo6jtVE4DtA46IJ8JLZmh8Oh0ijVF44BNAby/io2MoRhhwGpxyZjPlmjUOE0QNOgaaXRQMqvt8EYBxoxFBwEUBAMmZbhnup8/c+dLwmk2FroINxwBKARKBRPI5ezsmoLpOxcJA589SI4BqZWUj9RyhQxEoPfHANgDHAqs8+LqrLD4ODa9uzhwMMGcBwo+czYAXB0UfsvDgA0AKZ8ZPCCHQ4HRcWfHANgDHBiuyMpLtlxcFRV5DzA86BCEkAKiY25zZ0O7nTDPLKohB0Ch0TEdE1BMm28Hs/F4ljAYiFKZK9AZDXWKAmkgNi34jpovCYe+xVGxOiSdGw1Kqv1AAixAyBwBkAZiCugfSoZMGSAVBAfp07AGYBuB2T1WE5EdgxQ5MPdOUiVMAyW/NEAjsTxSlnskCClxFY+g3pkTZ2xm8x/dNzwKpsmOwkWc/70gMbEkI/ls8iF4T1MTpA/HwFIYJKnOfFCtBuHARiGwlgkJTsWuzaDlBvvQmwZDgEwBIWRSEpwyQ4CStpMF/cnhW9JXjQ+lxmch3hIEpIBUm3MGGj708UKHaBj2ZwDcA5otZXYUUAKjskCPrRtECc24u6Hdb9JyYjIzv2kypi7/wGFltbU44t4wRmIhyHVkvoGEqk35kg0xmN/xqPHEoBQ9b3wEbKjkF/+jvBkTW2cFFOopOoT5wGYh2wEEoYAUnpsBiFOGCE8LIZDNxwmS/2T0cm8ntZNGCz4OCU4G7RxSonVwn1JIjXIZKyau/2g208xPC2KhaWwJi0VqghTqEeSKBKjhfPFJA3DKF76wokAJkKmKgpgTFCURn9qjzgI4CDoFEkBDANSa0yahp3kG3b8GY4FLBYibfkLHBek/tgJ4glO6Z5Jb/LOwoPbKOD44POe2OfXkIUvdCrYxRmf1PDpx61FMtUhIWM39OBcAHMhkwPYeV6M03NBqpQvQcDzmcK7ndaRkFg1BzKpRPJyC+UCQO8ysCOAIj0uwjn63tzz0J1FWg03CaivKJMCZJ7MmPNQDg+qdrRwFxgeB5dUczpKoqNY1q1EOI4ut+aQlAMJ2nRs6jQYJIeq+nBGSmakUO+tTEYOFfXhbJTEhkERp8BoOJj1MWsy7vCC3Uc+AA7OhSwa+wxQMWHFBaUsD4WLerDk02bgyVDMo0ELM3VbJlXMvh0GO2Md6fhHMhomfJtFfPY1e4WrOH2GpnMoJiMmFFLiLECQLNAS5v4GF0ERcD8DfWNeq6AEMlQyf6yoG6zIIKXPBxdTUGwgEiSSwXTORllsGBSFIysVe3o2SDmUYGO/3eA8wPKQH2OvrWA1PqpQ9M9xXARpvwYX5wCcAyxfQPYnSLEz72Pe8SdDGQTQRAp2/qet7nY//GAx5wSURIAskgnkRFaFPiWFVCm7yYwJ7v1SvK9CrtRRjqqSDxyBTxBgojppOgUBgRkCBwXIBnc9tOt12nQpdq4nFcbC3V/nCIAjUChJRekMMANCJeXF4twHDgQ4EIWqVKBAUCZU7gPxxIEAB8I09+Y4UAQDdkCQUmJt7FpYUq67r9YCT3AQkm/PuWAdOghf6DcyG7hWSRGx4fjc/aW5n9p3ZOd+inLoRslReVtQPgwydfo9KxgoNWmC2Zq7vzT3a5SxZ3buJzXEO2QEl/u/NP/jLiIkARQd8fGh33u4ytdlV24a6L+fjd+82PnnEUP6Gg/Po5f4Mk8SROjyHiG0CQg6LaP0SfCgLNTu9dqchBJIMESlRBAocxob7UZt0Op1OQzwMCjZnVkGDBqpNrYr1QZvFsogwSyxVdAoKmOl+1ThIJQBwn4/QREpohI7Ekh58anVeOYclPFoUMoEgVQX+616o1rZRhS1XreLeg6cjfL7kMBsUKTHwe92gz8uygksC6MQ2YQmGBZI5bHeqz12Gl3eMPwFDQMwDKQK9dNdDwMrdLAUOUI2sxcR67SAE+RifOT/WzaEfTYk/TRsSIawx4ZIyzaLCCLhUMVszz/CQyc7l7VsoYMQ4Uo2Fvrb9FdxjtG7gFe5Yq9cS4VeJr1qsspKt9bJbmaao4GvgPnSMyTAVxph5+nCqToUBBHisflPzOZH62RXM8sUNfbtd47Hp3icoD9BrI3Qj7BgMEOBNsbNs0sCPitMSf6XMIjaaWh4nLthb/iW9BTG1tAdJx/tzVycX9jH/zihtbz2g+vr6+TwY3/6nuw1iqIZOlclli2ay+XyOt03Pl1zEeKjJTtJKt5NxTuqhV3R63nWg72ef6QVM7Z4aju2S9ndYTEMcFVfJ3V+ATU6oTvRgUR6uSkYuqAWvKzQyT7FU0ESlGtt+6MXnxEUvTp7kOw6X/z3BXLRyx3/H2odji6k6SR1lIXlyHV58nrWDw6lQIiiUybEsOtWUtbUpBnphSQTtdBCbUazt+A9TNZPDU3+AgkSK0lCpyyxSUKLJDX9XWJQDgHjroNMmR/1ecYvZjGFQQ577+eOvOM4MH46FMMKjIPyaU/SZEYDOfadl89Mg4s4YY/lYFEqLm7iOnhhdtoP5agwFqgEc7+rScn3JTFbbmOQkmU9WGCDSoL9mQJx1n49zaqqYh63wrLLL6SgZtVpMEhVUgK50f8mX6ehp7ClcoCvsf5dYSI7SpJ8LemqoUmCZpiaWpgYp1OXXZL+F0/i/4OqY5626zV+KCDffg9dexHO/TgJoJdUUBXCdDd0MXJswfTjHTeyyKPYyGpu6DpXNemqQhyjgN1WSBBPIyRsvU5Ce3Bo7RQNgJQtnNwWyaU07SotKZt5CieTeuLBmzz2xcF7EN9m1iIK5qmR/2Xzv3NbffWGPEn7axrX8s5PwRcGGaXRVi9k9+CfuYJcvyLy9nYXjFM43Cg8cFXIFvWQPJfOJctCrwZuCWOpVui6S/Rv24/T4iV7VWazMf5Gsd7bt16t0Cfa2OIB53ZyuLwEOl4ki4x7UQ2rSsbXDBtWUnw7eDdfYMOqkLcdu4b1YIKZXyDt6/9vgAMxsq4o6rF6KsxEMJMUwbKBdU5G+WTQNHJ2LBxMMsOTy5TPgioYpU2/MUn5KyXjhpNRPhlKPi8ThoaDZfuy3vYjp6J8KnTKlG92TByUytrbsG1vdK3NGSmdEQ10wNWkzNxLM5zG4X7GSZ2TUT4Zsn6sEKgCNApjkqpg1bLfsbewJBRL53V37EY8v81fwI0u7I3gl8nNwamAnJa/hBZqqjwwPg4m3H7gaJSPRiH9cpkNCSVZTpaVnz44y3EBx0XTy9JQZeGQhpqVh9wf7eeslM0KPSkfOz4O6qq36GgciNKBMGTx+LOGFRwHpdUGLgHH2SibDU0uj42jQitvQP4OSExAHS3PMXsYC950/A1UmJJxXAthxchBrTVjpMoJKZ8QTShrTFcWSFm1QEiTE1I+ISZVIWPFBCmZ7g/a4UPwhF7lYyEKkgobwx4USzM0fnMs/gIsaJO52UFxaFppYfJ1PbTIedacDng6zH3FXAJkRaSIpDzrAnheN0WhPDVY5d+QRYryGdcj4l6H9bp+tHQlOwZIgTMtSsQhAIXgCxOI2UFAKpk3yfpWDgEsBPS5wuwcT2qVj1OPu74M19MmBLNzPClAtgOcJ6P5OB3Hv6RBQlqstI3T9HEkYJHQBO1YQMAOEFJ/rC9mY+Qw3jeAB0EG7Q2QMmM2JVPoo1/sKM78jT/GU7KBo6ALsD0EUlnMYVj66PwIhDxTH8cBGgfqFF12MJCK4mARTvPOwgM2MCbDFHCWHGxRoYa7E0t/zp8a4GzQiltnpSVPzkaWHWGHjQ62hRWnAbkLA2wi3kaUwQGtyjWzNkIiRcW+iye8JLVD8NogTgAwAWZWOhKGAFJSRF96bM3ixN64GgCyDF5QyCkApcCQIQNIidQUG6uZFbcEnIHSGNAgVSaJlBcbq1hP4vJyKd6nTYRl531SY8xWknP3l9INkGi15BgCQFkaHsZJ/ZK+YDMMeO04eApocxbZMUBZ5p0l0s1kg7Q1EPgSvHLiQ/qCO3ZIUCYrjl0LPxeerXVq0ML40yAIxpHPHxnQbIiCROky6BorNEiBsZJlFuWuh3Y9bbYqs1ZBpsxAHAdxWmE73rVZ9+d2Xog2qe7BkQBGIktIuocEq9ZAJqVEe4K7DT4yi2vh34JXzEc8q7mGX87SglGFPSy8TCLN4z+x7F4/SeLPAUoA0uMfAiB5L/GycXWSac/5PJe8POU1pVaMwg4qUp0kMNgvA7kc+ZHbj/NZyfVlaGGnjqIJLkcpFrjAFR/jn4MQHbhzT2BYUSxUDjdk8maVaTPIs/3+zK6k3neudtWkI8lM6FYWT2FlUlHbXwLGM4Z/vpLjFDyYRV39aOVtVpWvZJnU2PZ54Lmh4XnQlL2qiZTYmh0PlGXD8ZIOoc9jKPYdZjHP/vDZmButkMRpvE+KbeliDu7+ctyPmwI4ACavlc36hxr9asi9x54xu2n0h99pVBAkzEfWDP/qTyzP3fFtG1fPvAvmfhxXyfVhEEXBBO0Ql9XEkzm8uFO3Y93X+OcgH9Z8FhcIr7/6K9wVrManrGRbhWwL+t1BPFzJleSl1IyruVdXExzr3d12pZd1VRk+rxb2RvCt2wfBrgcfbdmRnbUqd9bqhz2xPzpvlWWnZm6cie23bkfR8Ebd9KajufWshnf9H4Fz+7Ds+cYH+pTcntqb9sRcv6yNVW/wrrblZL+WX5Wt5wfBqgt+5+1l6dZannXzNHuRRsJdv7Xq3VYVtI/08uvHxno2F3hb+62Bzvcye/nl1IayZ7beKl6nVll3/cqqV2vh8rW31ZFz43kv6KjDfmXVqv/2BrXKqlurSK3G0usM7r1Ov9pp1VtSq/6evYc+jbc1BPR3He+HPtvxqxq6go1z++PDkh7Nlt+dvEx++62bl9nwZoled9a955b08tby2xvFaMvIehsF++skXWRFM1EPaJtMxShW05HJPrJECfD+h7LzxD2gPQ/V7tPGXdQju/9udL6v6/J3WSGlhCtJG2eNw97NoP1nEWRvfE+KGuHSVMhGq+2b6DcP/+/4lhdak/l14XB2fkNsPyG/CoaOkzhsN/2vp526UXZCZJDknMk7BzcX7njHmo/yUCxYRGN/6qYzedONO7FYoeUfF1qFMHHhwVYjr5tVbBLyN7L2Z7JC1pyNrpfucBx4wfzaCa2lH8hkPChW1Golb8RTjUIlG/v9/XZWdJMPqlM8AYT9WFEyr3XyASBTinpl2/4F++hlGGAs8vdusPE6gePiPf4L&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-132-26-0"><rect x="25" y="241" width="132" height="26"/></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-102-235-10-20-0"><rect x="102" y="235" width="10" height="20"/></clipPath><clipPath id="mx-clip-120-144-192-26-0"><rect x="120" y="144" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-176-202-26-0"><rect x="120" y="176" width="202" height="26"/></clipPath><clipPath id="mx-clip-120-208-192-26-0"><rect x="120" y="208" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-241-192-26-0"><rect x="120" y="241" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-273-192-26-0"><rect x="120" y="273" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-305-192-26-0"><rect x="120" y="305" width="192" height="26"/></clipPath><clipPath id="mx-clip-120-337-211-26-0"><rect x="120" 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-99-26-0"><rect x="385" y="305" width="99" 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-147-26-0"><rect x="506" y="208" width="147" 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-528-122-26-0"><rect x="378" y="528" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-561-122-26-0"><rect x="378" y="561" width="122" height="26"/></clipPath><clipPath id="mx-clip-378-593-152-26-0"><rect x="378" y="593" width="152" height="26"/></clipPath><clipPath id="mx-clip-378-625-122-26-0"><rect x="378" y="625" width="122" 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-754-122-26-0"><rect x="378" y="754" 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-851-122-26-0"><rect x="378" y="851" 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-948-122-26-0"><rect x="378" y="948" 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-548-432-117-26-0"><rect x="548" y="432" width="117" height="26"/></clipPath><clipPath id="mx-clip-548-496-144-26-0"><rect x="548" y="496" width="144" 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-142-26-0"><rect x="548" y="561" width="142" height="26"/></clipPath><clipPath id="mx-clip-548-593-122-26-0"><rect x="548" y="593" width="122" height="26"/></clipPath><clipPath id="mx-clip-548-625-142-26-0"><rect x="548" y="625" 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-754-142-26-0"><rect x="548" y="754" 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-548-948-142-26-0"><rect x="548" y="948" width="142" height="26"/></clipPath><clipPath id="mx-clip-405-1068-239-20-0"><rect x="405" y="1068" width="239" height="20"/></clipPath><clipPath id="mx-clip-405-1105-258-20-0"><rect x="405" y="1105" 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-241-92-26-0"><rect x="745" y="241" width="92" height="26"/></clipPath><clipPath id="mx-clip-745-273-72-26-0"><rect x="745" y="273" width="72" 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-834-112-162-26-0"><rect x="834" y="112" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-144-162-26-0"><rect x="834" y="144" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-176-162-26-0"><rect x="834" y="176" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-208-162-26-0"><rect x="834" y="208" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-241-162-26-0"><rect x="834" y="241" width="162" height="26"/></clipPath><clipPath id="mx-clip-834-273-152-26-0"><rect x="834" y="273" width="152" height="26"/></clipPath><clipPath id="mx-clip-834-337-85-26-0"><rect x="834" 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-754-82-26-0"><rect x="745" y="754" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-819-82-27-0"><rect x="745" y="819" width="82" height="27"/></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-883-82-26-0"><rect x="745" y="883" 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-82-26-0"><rect x="745" y="948" width="82" 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-82-26-0"><rect x="745" y="1013" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1045-82-26-0"><rect x="745" y="1045" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1077-82-26-0"><rect x="745" y="1077" width="82" height="26"/></clipPath><clipPath id="mx-clip-745-1109-98-26-0"><rect x="745" y="1109" width="98" height="26"/></clipPath><clipPath id="mx-clip-845-690-132-26-0"><rect x="845" y="690" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-658-132-26-0"><rect x="845" y="658" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-722-132-26-0"><rect x="845" y="722" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-754-132-26-0"><rect x="845" y="754" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-818-195-28-0"><rect x="845" y="818" width="195" height="28"/></clipPath><clipPath id="mx-clip-845-851-132-26-0"><rect x="845" y="851" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-883-132-26-0"><rect x="845" y="883" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-916-132-26-0"><rect x="845" y="916" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-948-132-26-0"><rect x="845" y="948" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-980-132-26-0"><rect x="845" y="980" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1013-132-26-0"><rect x="845" y="1013" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1045-132-26-0"><rect x="845" y="1045" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1077-132-26-0"><rect x="845" y="1077" width="132" height="26"/></clipPath><clipPath id="mx-clip-845-1109-208-26-0"><rect x="845" y="1109" width="208" 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-165-1109-142-26-0"><rect x="165" y="1109" width="142" height="26"/></clipPath><clipPath id="mx-clip-25-1109-132-26-0"><rect x="25" y="1109" width="132" 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-834-305-152-26-0"><rect x="834" y="305" width="152" 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-845-787-132-26-0"><rect x="845" y="787" width="132" height="26"/></clipPath><clipPath id="mx-clip-745-787-82-26-0"><rect x="745" y="787" width="82" height="26"/></clipPath><clipPath id="mx-clip-120-112-192-26-0"><rect x="120" 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-130-781-10-20-0"><rect x="130" y="781" width="10" height="20"/></clipPath><clipPath id="mx-clip-91-141-10-20-0"><rect x="91" y="141" 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-496-132-26-0"><rect x="25" y="496" 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-754-132-26-0"><rect x="25" y="754" 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-980-132-26-0"><rect x="25" y="980" 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-25-1077-132-26-0"><rect x="25" y="1077" 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-496-142-26-0"><rect x="165" y="496" 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-625-142-26-0"><rect x="165" y="625" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-658-142-26-0"><rect x="165" y="658" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-690-142-26-0"><rect x="165" y="690" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-722-151-26-0"><rect x="165" y="722" width="151" height="26"/></clipPath><clipPath id="mx-clip-165-754-142-26-0"><rect x="165" y="754" 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-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-883-142-26-0"><rect x="165" y="883" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-916-142-26-0"><rect x="165" y="916" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-980-142-26-0"><rect x="165" y="980" width="142" 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-1013-168-26-0"><rect x="165" y="1013" width="168" height="26"/></clipPath><clipPath id="mx-clip-165-1045-142-26-0"><rect x="165" y="1045" width="142" height="26"/></clipPath><clipPath id="mx-clip-165-1077-148-26-0"><rect x="165" y="1077" 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-1215-852-112-26-0"><rect x="1215" y="852" width="112" height="26"/></clipPath></defs><g><image x="377.08" y="1066.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="457" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="521" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="489" 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="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="618" 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="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="779" width="340" height="31" 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="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="908" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1102" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="1070" width="340" height="30" 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="1005" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="7" y="973" width="340" height="30" 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="367" y="425" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="521" width="340" height="31" 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="586" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="650" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="618" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="489" 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="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="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="779" width="340" height="31" 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="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="908" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="367" y="941" 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="747" 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="779" width="340" height="31" 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="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="908" 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="1005" width="340" height="31" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="973" 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="727" y="1070" width="340" height="30" fill="#ffffff" stroke="none" pointer-events="all"/><rect x="727" y="1102" 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</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">F2 / Enter</text></g><rect x="21" y="235.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-241-132-26-0)" font-size="12px"><text x="26.5" y="253">F2 / Tab / 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="102" y="234" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-102-235-10-20-0)" font-size="10px"><text x="103.5" y="245.5">1</text></g><rect x="116" y="139" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-144-192-26-0)" font-size="12px"><text x="121.5" y="156.5">New Line in Formatted Labels</text></g><rect x="116" y="171" width="210" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-176-202-26-0)" font-size="12px"><text x="121.5" y="188.5">New Paragraph in Formatted Labels</text></g><rect x="116" y="203" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-208-192-26-0)" font-size="12px"><text x="121.5" y="220.5">Start Editing Label of Selected Cell</text></g><rect x="116" y="235.5" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-241-192-26-0)" font-size="12px"><text x="121.5" y="253">Stop Editing and Apply Value</text></g><rect x="116" y="268" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-273-192-26-0)" font-size="12px"><text x="121.5" y="285.5">Toggle Bold/Italic on Selected Text</text></g><rect x="116" y="300" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-305-192-26-0)" font-size="12px"><text x="121.5" y="317.5">Toggle Underline on Selected Text</text></g><rect x="116" y="332" width="219" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-337-211-26-0)" font-size="12px"><text x="121.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+(Shift+)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+Shift+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="107" 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-99-26-0)" font-size="12px"><text x="386.5" y="317.5">Ctrl / Shift+Click</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 Child / 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">Add to Selection</text></g><rect x="502" y="203" width="155" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-506-208-147-26-0)" font-size="12px"><text x="507.5" y="220.5">Remove from Selection</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+Mouse wheel</text></g><rect x="374" y="491" 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="508.5">Ctrl+Mouse wheel</text></g><rect x="374" y="523.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-528-122-26-0)" font-size="12px"><text x="379.5" y="541">Mouse wheel</text></g><rect x="374" y="556" 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-561-122-26-0)" font-size="12px"><text x="379.5" y="573.5">Shift+Mouse wheel</text></g><rect x="374" y="588" 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-593-152-26-0)" font-size="12px"><text x="379.5" y="605.5">Space / Right mouse Drag</text></g><rect x="374" y="620" 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-625-122-26-0)" font-size="12px"><text x="379.5" y="637.5">Ctrl+Shift+Drag</text></g><rect x="374" y="652.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-658-122-26-0)" font-size="12px"><text x="379.5" y="670">Ctrl+Shift+Connect</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">Shift+Home</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">End</text></g><rect x="374" y="749" 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-754-122-26-0)" font-size="12px"><text x="379.5" y="766.5">Home</text></g><rect x="374" y="781.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-787-122-26-0)" font-size="12px"><text x="379.5" y="799">Ctrl+Shift+H</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+J</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+Shift+J</text></g><rect x="374" y="910.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-916-122-26-0)" font-size="12px"><text x="379.5" y="928">Ctrl + (Numpad)</text></g><rect x="374" y="943" 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-948-122-26-0)" font-size="12px"><text x="379.5" y="960.5">Ctrl - (Numpad)</text></g><rect x="374" y="878" 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="895.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" width="152" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-496-144-26-0)" font-size="12px"><text x="549.5" y="508.5">Screen Zoom In/Out (Mac)</text></g><rect x="544" y="523.5" 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">Canvas Vertical Scroll</text></g><rect x="544" y="556" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-561-142-26-0)" font-size="12px"><text x="549.5" y="573.5">Canvas Horizontal Scroll</text></g><rect x="544" y="588" width="130" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-593-122-26-0)" font-size="12px"><text x="549.5" y="605.5">Pan Canvas</text></g><rect x="544" y="620" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-625-142-26-0)" font-size="12px"><text x="549.5" y="637.5">Create / Remove Space</text></g><rect x="544" y="652.5" 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">Disable Connections</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">Home</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">Refresh</text></g><rect x="544" y="749" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-754-142-26-0)" font-size="12px"><text x="549.5" y="766.5">Reset View</text></g><rect x="544" y="781.5" 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">Fit Window</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 Page</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">Fit Two Pages</text></g><rect x="544" y="878" 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="895.5">Custom Zoom</text></g><rect x="544" y="910.5" 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">Zoom In</text></g><rect x="544" y="943" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-548-948-142-26-0)" font-size="12px"><text x="549.5" y="960.5">Zoom Out</text></g><rect x="405" y="1007" 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="406.5" y="1021.5">Click to connect and clone (ctrl+click to clone,</text><text x="406.5" y="1035.5">shift+click to connect). Drag to connect</text><text x="406.5" y="1049.5">(ctrl+drag to clone).</text></g><image x="381.99" y="1102.5" width="15" height="25" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAZAgMAAACTN5xfAAAACVBMVEX///////8AAACO9MPsAAAAAXRSTlMAQObYZgAAAFRJREFUeF5VyjEKgDAQRNGPRSA38AB6JEWsUkggt9hLGDbdlh5Tp7R5DPzBAEK46OI2UcQhdrGZKB/nA13B9Q5hqwEij+akVi/yFDMJFjL8VlUdw1+gHxbW+YsglAAAAABJRU5ErkJggg=="/><rect x="405" y="1068" width="239" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1068-239-20-0)" font-size="12px"><text x="406.5" y="1082.5">Click to rotate 90° clockwise. Drag to rotate.</text></g><rect x="405" y="1105" width="258" height="20" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-405-1105-258-20-0)" font-size="12px"><text x="406.5" y="1119.5">Ctrl: Show Dialog, Alt: Origin, Shift: Ignore XML</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-241-92-26-0)" font-size="12px"><text x="746.5" y="253">Ctrl+Shift+M</text></g><rect x="741" y="268" 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-273-72-26-0)" font-size="12px"><text x="746.5" y="285.5">Rightclick</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="830" y="107" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-112-162-26-0)" font-size="12px"><text x="835.5" y="124.5">Toggle Layers Window</text></g><rect x="830" y="139" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-144-162-26-0)" font-size="12px"><text x="835.5" y="156.5">Toggle Outline Window</text></g><rect x="830" y="171" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-176-162-26-0)" font-size="12px"><text x="835.5" y="188.5">Edit Metadata</text></g><rect x="830" y="203" width="170" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-208-162-26-0)" font-size="12px"><text x="835.5" y="220.5">Toggle Format Panel</text></g><rect x="830" 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-834-241-162-26-0)" font-size="12px"><text x="835.5" y="253">Edit Vertex Geometry</text></g><rect x="830" y="268" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-273-152-26-0)" font-size="12px"><text x="835.5" y="285.5">Context Menu</text></g><rect x="830" y="332" width="93" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-337-85-26-0)" font-size="12px"><text x="835.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 from sidebar</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 sidebar item</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 sidebar item</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 sidebar item</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">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, connect on drop (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">Inserts and connects 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">Replaces the selected item with the clicked one</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">Connects 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">Connect to shape outline (ignore connection points)</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+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+Shift+S</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">Ctrl+Z</text></g><rect x="741" y="749" 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="766.5">Alt+Shift+A</text></g><rect x="741" y="813.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-819-82-27-0)" font-size="12px"><text x="746.5" y="831">Hold Alt</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+Shift+G</text></g><rect x="741" y="878" 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-883-82-26-0)" font-size="12px"><text x="746.5" y="895.5">Ctrl+P</text></g><rect x="741" y="910.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-916-82-26-0)" font-size="12px"><text x="746.5" y="928">Ctrl+Y</text></g><rect x="741" y="943" 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-948-82-26-0)" font-size="12px"><text x="746.5" y="960.5">Ctrl+Shift+Z</text></g><rect x="741" y="975" 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="992.5">Ctrl+Shift+X</text></g><rect x="741" y="1007.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-1013-82-26-0)" font-size="12px"><text x="746.5" y="1025">Ctrl+K</text></g><rect x="741" y="1040" 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-1045-82-26-0)" font-size="12px"><text x="746.5" y="1057.5">Ctrl+Shift+K</text></g><rect x="741" y="1072" 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-1077-82-26-0)" font-size="12px"><text x="746.5" y="1089.5">Esc</text></g><rect x="741" y="1104" 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-1109-98-26-0)" font-size="12px"><text x="746.5" y="1121.5">Alt+Drag / Drop</text></g><rect x="841" y="685" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-690-132-26-0)" font-size="12px"><text x="846.5" y="702.5">Save as</text></g><rect x="841" 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-845-658-132-26-0)" font-size="12px"><text x="846.5" y="670">Save</text></g><rect x="841" y="717" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-722-132-26-0)" font-size="12px"><text x="846.5" y="734.5">Undo</text></g><rect x="841" y="749" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-754-132-26-0)" font-size="12px"><text x="846.5" y="766.5">Connection Arrows</text></g><rect x="841" y="813" width="203" height="28" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-818-195-28-0)" font-size="12px"><text x="846.5" y="830.5">Ignores handles under the mouse</text></g><rect x="841" y="846" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-851-132-26-0)" font-size="12px"><text x="846.5" y="863.5">Toggle grid</text></g><rect x="841" y="878" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-883-132-26-0)" font-size="12px"><text x="846.5" y="895.5">Print</text></g><rect x="841" y="910.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-916-132-26-0)" font-size="12px"><text x="846.5" y="928">Redo (Windows)</text></g><rect x="841" y="943" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-948-132-26-0)" font-size="12px"><text x="846.5" y="960.5">Redo (Linux/Mac)</text></g><rect x="841" y="975" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-980-132-26-0)" font-size="12px"><text x="846.5" y="992.5">Insert Text</text></g><rect x="841" y="1007.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1013-132-26-0)" font-size="12px"><text x="846.5" y="1025">Insert Rectangle</text></g><rect x="841" y="1040" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1045-132-26-0)" font-size="12px"><text x="846.5" y="1057.5">Insert Ellipse</text></g><rect x="841" y="1072" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1077-132-26-0)" font-size="12px"><text x="846.5" y="1089.5">Cancel Action</text></g><rect x="841" y="1104" width="216" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-1109-208-26-0)" font-size="12px"><text x="846.5" y="1121.5">Force Rubberband / Ignore Group</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 size) 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">SIDEBAR / 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="161" y="1104" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1109-142-26-0)" font-size="12px"><text x="166.5" y="1121.5">Connect to a Fixed Point</text></g><rect x="21" y="1104" 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-1109-132-26-0)" font-size="12px"><text x="26.5" y="1121.5">Alt+Connect</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+Click</text></g><rect x="830" y="300" width="160" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-834-305-152-26-0)" font-size="12px"><text x="835.5" y="317.5">Context Menu</text></g><a xlink:href="https://www.draw.io/?url=https%3A%2F%2Fwww.draw.io%2Fshortcuts.svg"><rect x="1111.67" y="1111" width="114" 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="1124.5">Open in draw.io...</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+Mouse 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="841" y="781.5" width="140" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-845-787-132-26-0)" font-size="12px"><text x="846.5" y="799">Connection Points</text></g><rect x="741" y="781.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-787-82-26-0)" font-size="12px"><text x="746.5" y="799">Alt+Shift+P</text></g><rect x="116" y="107" width="200" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-120-112-192-26-0)" font-size="12px"><text x="121.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="130.28" y="780" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-130-781-10-20-0)" font-size="10px"><text x="131.78" y="791.5">2</text></g><rect x="1112" y="1077" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1089">Ctrl+Resize for non-recursive group resize</text><text x="1113.5" y="1103">Ctrl+Meta+Resize for centered group resize</text></g><rect x="1105.33" y="1069" 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="1080.5">2</text></g><rect x="91" y="140" width="10" height="16" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-91-141-10-20-0)" font-size="10px"><text x="92.5" y="151.5">1</text></g><rect x="1112" y="1038" width="255" height="29" rx="4.35" ry="4.35" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" font-size="12px"><text x="1113.5" y="1050">Ctrl / Shift+Enter: New Line / Apply in Safari</text><text x="1113.5" y="1064">Ctrl / Shift+Esc: Cancel Editing</text></g><rect x="1105.33" y="1030" 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="1041.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</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+C</text></g><rect x="21" y="491" 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-496-132-26-0)" font-size="12px"><text x="26.5" y="508.5">Ctrl+V</text></g><rect x="21" y="523.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-529-132-26-0)" font-size="12px"><text x="26.5" y="541">Ctrl+G</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+Shift+U</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+L / Alt+Shift+L</text></g><rect x="21" y="620" 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="637.5">Ctrl+Enter / D</text></g><rect x="21" y="652.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-658-132-26-0)" font-size="12px"><text x="26.5" y="670">Backspace or 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+Delete</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">Ctrl+R</text></g><rect x="21" y="749" 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-754-132-26-0)" font-size="12px"><text x="26.5" y="766.5">Shift+Resize</text></g><rect x="21" y="781.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-787-132-26-0)" font-size="12px"><text x="26.5" y="799">Ctrl / Meta+Resize</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+Home</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+End</text></g><rect x="21" y="878" 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="895.5">Ctrl+Shift+Home</text></g><rect x="21" y="910.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-916-132-26-0)" font-size="12px"><text x="26.5" y="928">Ctrl+Shift+End</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+Shift+B</text></g><rect x="21" y="975" 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-980-132-26-0)" font-size="12px"><text x="26.5" y="992.5">Ctrl+Shift+F</text></g><rect x="21" y="1007.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-1013-132-26-0)" font-size="12px"><text x="26.5" y="1025">Alt+Shift+C/T</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+Y</text></g><rect x="21" y="1072" 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-1077-132-26-0)" font-size="12px"><text x="26.5" y="1089.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</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">Copy</text></g><rect x="161" y="491" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-496-142-26-0)" font-size="12px"><text x="166.5" y="508.5">Paste</text></g><rect x="161" y="523.5" 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">Group</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">Ungroup</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">Lock/Unlock / Edit Link</text></g><rect x="161" y="620" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-625-142-26-0)" font-size="12px"><text x="166.5" y="637.5">Duplicate</text></g><rect x="161" y="652.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-658-142-26-0)" font-size="12px"><text x="166.5" y="670">Delete Selected Cells</text></g><rect x="161" y="685" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-690-142-26-0)" font-size="12px"><text x="166.5" y="702.5">Delete with Connections</text></g><rect x="161" y="717" width="159" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-722-151-26-0)" font-size="12px"><text x="166.5" y="734.5">Turn / Rotate 90° Clockwise</text></g><rect x="161" y="749" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-754-142-26-0)" font-size="12px"><text x="166.5" y="766.5">Maintain Proportions</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">Send to Back</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">Collapse 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">Expand Container</text></g><rect x="161" y="878" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-883-142-26-0)" font-size="12px"><text x="166.5" y="895.5">Exit Group</text></g><rect x="161" y="910.5" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-916-142-26-0)" font-size="12px"><text x="166.5" y="928">Enter Group</text></g><rect x="161" y="975" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-980-142-26-0)" font-size="12px"><text x="166.5" y="992.5">Bring to Front</text></g><rect x="161" y="781.5" 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">Centered / Group Resize</text></g><rect x="161" y="1008" width="176" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1013-168-26-0)" font-size="12px"><text x="166.5" y="1025.5">Clear Waypoints / Edit Tooltip</text></g><rect x="161" y="1040" width="150" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1045-142-26-0)" font-size="12px"><text x="166.5" y="1057.5">Autosize</text></g><rect x="161" y="1072" width="156" height="26" fill="none" stroke="none" pointer-events="all"/><g fill="#333333" font-family="Helvetica" clip-path="url(#mx-clip-165-1077-148-26-0)" font-size="12px"><text x="166.5" y="1089.5">Clone cell/Disconnect edge</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</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</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</text></g><rect x="1211" 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-1215-852-112-26-0)" font-size="12px"><text x="1216.5" y="864">Paste Size</text></g><image x="376.49" y="1012.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 style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><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 style="box-sizing: border-box; font-size: 0; text-align: left; "><div style="display: inline-block; font-size: 15px; font-family: Helvetica; color: #1A5BA3; line-height: 1.2; pointer-events: all; font-weight: bold; white-space: nowrap; "><font style="font-size: 20px">diagrams.<font color="#f08707" style="font-size: 20px">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://desk.draw.io/support/solutions/articles/16000042487" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Viewer does not support full SVG 1.1</text></a></switch></svg> \ No newline at end of file